What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Put NGINX in front of your Node.js process, define a shared limit_req_zone in the main http {} block, and apply limit_req to the API location that proxies to Node. The example below allows an average of 5 requests per second per client IP, absorbs a burst of 10, and returns HTTP 429 when the burst is exhausted.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Roll it out safely with limit_req_dry_run on;, validate with sudo nginx -t, reload only after a successful test, then generate controlled traffic to verify the delay and rejection behavior.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesWhat NGINX rate limiting protects
A Node.js server can be overwhelmed by short request spikes even when its average traffic is manageable. NGINX can enforce a request budget before traffic reaches Node, so expensive handlers, database calls, and authentication code do not all run at once. The usual layout is:
client → NGINX (TLS termination and rate limit) → Node.js (for example, 127.0.0.1:3000)
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
NGINX’s HTTP request-limit module uses a leaky-bucket algorithm. A shared zone stores per-key state, and each request either fits the configured rate, waits in an allowed burst, or is rejected. The key can be a variable such as $binary_remote_addr, which makes the example below a per-client-IP policy.
Rate limiting is not a capacity guarantee. The values in this article are an illustrative starting point; the correct rate depends on your endpoints, authentication model, database workload, and normal traffic pattern.
Recommended Free Tools
Install and locate NGINX on Ubuntu
Use the official NGINX Ubuntu package instructions for your distribution. The documented installation flow adds the official signing key and repository, then installs the package with:
sudo apt update
sudo apt install nginx
Check that the service is answering locally:
curl -I 127.0.0.1
Ubuntu’s NGINX configuration is under /etc/nginx/. The main file is commonly /etc/nginx/nginx.conf; virtual-host files may be included from that file. Access and error logs are under /var/log/nginx/. Confirm the include structure on your machine before editing so that the zone is declared in the active configuration.
Understand the two directives
limit_req_zone: state, key, and average rate
Declare the zone once in the main http {} context. Its syntax defines the key, shared-memory size, and average rate:
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=5r/s;
- Key:
$binary_remote_addrstores compact client-address data, producing a separate counter for each client IP. - Zone:
api_limit:10mnames a shared-memory area and allocates 10 MB for request state. It is shared by workers that use this NGINX instance. - Rate:
5r/smeans an average of five requests per second. NGINX also accepts rates expressed per minute, such as300r/m.
The zone is only a definition; it does not limit anything until a location references it with limit_req.
limit_req: where requests are controlled
Apply the named zone in the server {} block or, more narrowly, in an API location {}. The directive also sets the burst behavior:
limit_req zone=api_limit burst=10 nodelay;
burst=10: permits up to 10 requests beyond the immediate rate as a queue of excess work.nodelay: sends requests admitted by that burst immediately instead of spacing them out over time.- No
nodelay: excess requests remain delayed by the leaky-bucket schedule while they are still within the burst.
Requests that exceed both the configured rate and the available burst are rejected. NGINX documents HTTP 503 as the default rejection status. For an API, you can deliberately return 429 (Too Many Requests) with limit_req_status 429;.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Copyable configuration for a Node.js API
Place the zone inside the existing http {} block in /etc/nginx/nginx.conf. Do not create a second top-level http block.
# /etc/nginx/nginx.conf, inside the existing http { } block
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=5r/s;
server {
listen 80;
server_name example.com;
location /api/ {
limit_req zone=api_limit burst=10 nodelay;
limit_req_status 429;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Replace example.com with the virtual host that receives your traffic and change the upstream address if Node listens elsewhere. The proxy_pass line sends matching /api/ requests to the local Node process. Keeping limit_req in that location limits the API without automatically applying the same policy to static files or unrelated paths.
Choose the scope deliberately
- One API location: best when API calls are expensive but health checks, static assets, or an administration path need different treatment.
- Whole virtual host: use when every request on that host should consume the same budget.
- Multiple zones: define separate zones when endpoints or client classes need independent rates. Each location must reference the intended zone explicitly.
How rate, burst, and nodelay behave
| Setting | Meaning | What a client observes |
|---|---|---|
rate=5r/s |
Average processing rate for each key in the zone | Requests are admitted at roughly five per second when no burst is being used |
burst=10 |
Queue capacity for excess requests | Up to ten additional requests can be delayed or admitted according to the delay policy |
nodelay |
Serve requests inside the burst immediately | A short spike can reach Node quickly; the burst still has a finite size |
No nodelay |
Delay requests in the burst | Clients experience spacing and latency rather than an immediate spike |
limit_req_status 429 |
Overrides the documented default rejection code of 503 | Excess API calls receive an explicit rate-limit response |
With the example policy, a client that sends a brief burst can consume the ten-request allowance. Continued traffic beyond that allowance receives 429 until requests stop arriving quickly enough for the bucket to drain. The numbers are configuration examples, not a measured capacity benchmark for every Node.js workload.
Roll out without blocking users unexpectedly
1. Back up and edit the active configuration
Save a copy of the relevant NGINX files, then add the zone and location policy. Confirm that the file you edit is included by the running configuration; an otherwise valid snippet has no effect if it is outside the active include tree.
2. Validate syntax before a reload
sudo nginx -t
Proceed only when NGINX reports that the syntax test is successful. A failed test leaves the current worker configuration running, so correct the reported file and line before trying again.
3. Observe in dry-run mode
Add limit_req_dry_run on; in the same applicable context while you evaluate normal traffic:
location /api/ {
limit_req zone=api_limit burst=10 nodelay;
limit_req_status 429;
limit_req_dry_run on;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Dry-run mode accounts for requests that would be excessive but does not enforce the limit, allowing them to continue to Node. Watch the access and error logs and compare the observed excess traffic with application latency. This is useful for discovering legitimate bursts before turning on rejection.
4. Reload after the test passes
sudo nginx -t
sudo systemctl reload nginx
Reloading applies the new worker configuration without stopping the service. Keep the dry-run directive enabled while you inspect a representative traffic window.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
5. Generate controlled requests
Send repeated requests only to a test endpoint or a maintenance window you control. Verify three outcomes separately:
- Normal traffic below the rate reaches Node successfully.
- A short burst follows your chosen policy: immediate service with
nodelay, or visible delay without it. - Sustained excess beyond the burst receives the configured status, 429 in the example.
Record response codes, latency, and Node-side load. Do not infer a universal safe rate from this one check; use the results to adjust the policy for your workload.
Free tools Windows power users keep installed
One-click scans. No signup required.
6. Enforce only after observation
Remove or set limit_req_dry_run off;, validate again, reload, and repeat the same controlled check. Keep the procedure and expected response codes in your deployment notes so a rollback is quick.
Pick a key that represents the real client
The example keys on the address NGINX sees. That is appropriate when NGINX is the internet-facing proxy and each client reaches it directly. If another proxy, load balancer, or CDN sits in front, every request may appear to come from that intermediary unless the topology is configured to preserve client identity. A shared key would then rate-limit many users together.
NGINX can key a zone by another trusted variable, including a server name or an application-defined value, but the variable must be stable and trustworthy. Changing the key changes who shares a bucket, so treat it as a policy decision rather than a syntax tweak.
Keep Express’s proxy identity consistent
Express uses trust proxy to decide how proxy-provided address and host information is exposed to the application. If your Node code uses req.ip, session restrictions, audit logging, or a second application-level limiter, configure app.set('trust proxy', ...) to match the actual number and arrangement of trusted proxies.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteDo not blindly trust arbitrary forwarded headers. Trust only the proxy hops you control. An incorrect setting can make Express identify the wrong client even when NGINX’s own key is correct, causing application rules and NGINX rules to disagree.
Tune the policy using operational axes
| Decision | Options | Question to answer |
|---|---|---|
| Key | Client IP, server name, or another trusted variable | Which callers should share one allowance? |
| Average rate | Requests per second or per minute | What sustained load can the endpoint and its dependencies handle? |
| Burst policy | Delayed queue, nodelay, or a two-stage delay policy |
Should short spikes add latency or arrive immediately? |
| Scope | One API location, a whole virtual host, or multiple zones | Which paths have the same cost and fairness requirements? |
| Client response | Default 503 or explicitly selected 429 | Will clients and monitoring distinguish overload from throttling? |
| Rollout | Immediate enforcement or dry-run observation first | How will you detect false positives before users are blocked? |
Adjust one dimension at a time when possible. A larger burst can hide a sustained overload, while a very small burst can reject harmless connection synchronization. Review endpoint cost, authenticated versus anonymous traffic, and the behavior of legitimate clients before changing the average rate.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Troubleshoot common failures
NGINX will not reload
- Run
sudo nginx -tand fix the exact file and line reported. - Ensure
limit_req_zoneis inside the existinghttp {}block, not insideserver {}orlocation {}. - Check that the zone name in
limit_req zone=...exactly matches the declaration.
Everything returns 429 too quickly
- Confirm the key. If a front proxy hides client addresses, many users may be sharing one bucket.
- Check whether a second location or server-level policy also applies.
- Compare the configured rate and burst with observed legitimate traffic, then use dry-run to measure before relaxing enforcement.
Clients see 503 instead of 429
503 is NGINX’s documented default for rejected requests. Add limit_req_status 429; in the context where the limit is applied, validate, reload, and retest.
Requests are delayed more than expected
Without nodelay, requests admitted by the burst are intentionally paced. If immediate handling of a short spike is acceptable, use nodelay; if protecting Node from instantaneous work is more important, retain delayed processing and choose a burst that matches the endpoint’s latency budget.
The policy appears not to run
- Verify that the request path matches the limited
location. - Confirm the running configuration includes the file you edited.
- Check NGINX access and error logs under
/var/log/nginx/. - Make sure traffic is reaching this NGINX instance rather than bypassing it and connecting directly to Node.
What this setup does not provide
NGINX’s limiter is local to the configured NGINX state. If traffic is distributed across multiple independent NGINX instances, each instance has its own zone unless you design a shared control plane. A single-instance rule therefore does not automatically create one global quota across a fleet.
The module also does not understand business identity by itself. Per-IP limiting can group multiple people behind one office, mobile carrier, or NAT address, while one abusive client can rotate addresses. If your product needs account-level fairness, combine the edge policy with an application-level control that uses authenticated identity, while keeping Express’s proxy trust configuration correct.
When to consider a supported commercial deployment
Open-source NGINX supplies the directives and dry-run workflow described here. Teams that require commercial support or additional multi-instance operational capabilities may evaluate NGINX Plus separately; the rate-limit semantics and configuration placement still need to match the actual proxy topology and application behavior.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Additional operating notes
Check prerequisites before editing
You need administrative access to install packages, edit files under /etc/nginx/, and reload the service. Confirm that the Node process is already listening on the address used by proxy_pass, preferably on a private interface such as 127.0.0.1. If Node is bound only to another address or port, NGINX can pass syntax checks yet still return upstream connection errors. Also verify that the virtual host receiving the request is the one you are changing; a correct rule in an unused server block has no effect.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Separate throttling from upstream failures
A 429 generated by limit_req_status means the request exceeded the configured allowance. It is different from a 502 or 504 caused by an unavailable or slow Node upstream, and different from the default 503 that NGINX emits when a request is rejected without an explicit status override. Track these responses separately so an upstream outage is not mistaken for client throttling.
Protect the bypass path
The limiter only sees traffic that enters the matching NGINX server and location. Restrict the Node listening port with your host firewall or network policy so clients cannot connect directly and avoid the edge rule. Apply equivalent controls to every public entry point, including alternate hostnames, IPv6 listeners, or another load balancer, or document why a path is intentionally exempt.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Recheck after topology changes
Adding a CDN, load balancer, or second NGINX instance changes the address NGINX sees and may change which clients share a bucket. Revisit the zone key, Express trust proxy setting, and whether a local zone still meets your fairness goal after every topology change. A limit that was sensible on one host may be unexpectedly strict or permissive when traffic is distributed.
Final deployment checklist
- The zone is declared once in the active
http {}context. - The API location that contains
proxy_passreferences the intended zone. - The key reflects the address or identity you actually want to limit.
rate,burst, andnodelaymatch the endpoint’s latency and load characteristics.- The response code is intentional: default 503 or explicitly configured 429.
sudo nginx -tpasses before every reload.- Dry-run observations cover normal traffic and controlled bursts.
- Logs and Node.js latency are monitored after enforcement.
- Express
trust proxymatches the real chain of trusted proxies. - Direct access to the Node port is restricted so clients cannot bypass NGINX.
Frequently Asked Questions
Where does limit_req_zone belong?
Declare it in the active main http {} block, usually in /etc/nginx/nginx.conf or an included file. It cannot be declared only inside a server or location block.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Does burst=10 allow ten requests every second?
No. It provides room for ten requests that exceed the immediate rate. They are delayed unless nodelay is enabled, and requests beyond the burst are rejected.
Why does NGINX return 503 instead of 429?
503 is the documented default rejection status. Add limit_req_status 429; where the policy is applied, then run sudo nginx -t and reload.
What does dry-run mode change?
limit_req_dry_run on; accounts for requests that would exceed the policy but does not delay or reject them. Use logs and latency observations to evaluate the settings before enforcement.
Should static files and health checks share the API limit?
Usually not. Apply limit_req only to the API location when static assets, health checks, or administrative paths have different traffic or availability requirements.
Will an IP limit work behind a load balancer or CDN?
It limits the address NGINX actually sees. If a front proxy masks client addresses, many users can share one bucket unless the topology preserves a trusted client address and the key is chosen accordingly.
How does Express affect this configuration?
If Express reads req.ip or uses its own limiter, set app.set('trust proxy', ...) to the real trusted proxy chain. Do not trust arbitrary forwarded headers.
Does one zone create a global quota across multiple NGINX servers?
No. The request state is local to each configured NGINX instance. Multiple independent instances need a separate shared control design if you require one fleet-wide quota.
The Bottom Line
Define one shared zone in http {}, apply it to the Node.js API location, and choose the key, rate, burst, delay policy, and rejection status deliberately. Observe with dry-run, validate with nginx -t, reload safely, test controlled bursts, and keep proxy identity consistent from NGINX through Express.
Recommended Free Tools
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




