Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
High-velocity queue for handling incoming Express.js requests across replicated codebase using Redis with minimal residue and maximum buzzwords
yarn add fishqueue
import Queue from 'fishqueue'
const queue = new Queue('webhook', { redis: process.env.REDIS_URI, concurrency: 3 })
app.post('/webhook', queue.process(async (req, res) => {
const result = await handleWebHook(req.body)
res.send(result)
}))
Pass an object containing the following properties into the second constructor argument of Queue
:
Property | Description | Required? | Defaults To |
---|---|---|---|
redis | A Redis connection object or URI (see here for more details) | no | null |
verbose | A boolean stating if fishqueue should provide detail logs | no | false |
concurrency | A number stating the amount of concurrent requests to be handled in accordance with concurrencyType | no | 3 |
concurrencyType | A string stating the type of concurrency which should be used. See Concurrency Types for more info | no | node |
Type | Description |
---|---|
node | Each instance of your app can handle {{ concurrency }} requests at a time. For example, a cluster of 3 nodes with a concurrency of 6 will handle 6 requests per node, totalling 18 requests in processing at any given time |
cluster | Requests will be handled in a distributed fashion. For example, a cluster of 3 nodes with a concurrency of 6 will handle 2 requests per node |
Node | Clusterbeta |
---|---|
Do No Harm
FAQs
Distributed Express.js Request Queue
The npm package fishqueue receives a total of 1 weekly downloads. As such, fishqueue popularity was classified as not popular.
We found that fishqueue 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.