
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
celerity uses redis to do centralized rate limiting for applications running on multiple heroku dynos
celerity uses redis to do centralized rate limiting for applications running on multiple heroku dynos (or processes).
npm install celerity
see example.js for a simple rate limited webserver using celerity
var celerity = require('celerity');
var redis = require('redis');
var config = {
redis: redis.createClient(),
timespan: 10 * 1000,
bucketCount: 10
};
celerity keeps the rate for the last timespan
milliseconds.
timespan
is divided into bucketCount
buckets.
the rate is stored in the buckets.
buckets older than timespan
expire every timespan / bucketCount
milliseconds.
a higher bucketCount
increases the frequency and accuracy of the expires
but uses more memory and results in slower read operations.
if timespan
is several seconds long it is usually enough to have
a bucket for every second.
use the prefix
property to set a prefix for all redis keys used by celerity.
the default prefix is celerity:
.
celerity.increment(config, 'event', 1, function(err) {
});
atomic. complexity: O(1).
celerity.read(config, 'event', function(err, rate) {
});
atomic. complexity: O(n) where n is bucketCount
.
celerity.incrementAndRead(config, 'event', 1, function(err, rate) {
});
atomic. complexity: O(n) where n is bucketCount
.
FAQs
celerity uses redis to do centralized rate limiting for applications running on multiple heroku dynos
We found that celerity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.