Haven't used FloodGate yet?
Ask Trustburn

Questions about FloodGate

Based on 5 reviews, listing data and website checks · updated 5 days ago

What is FloodGate?

FloodGate is an open-source software library providing distributed rate limiting for Node.js applications. It is MIT licensed and distributed via npm and GitHub. The library implements three rate-limiting algorithms—sliding window counter, sliding window log, and token bucket—executed as atomic Lua scripts on Redis for race-condition-free operation.

What technologies and integrations does FloodGate support?

The library is designed to be Redis Cluster-safe and works with ioredis as an optional peer dependency. It includes adapters for Express and Next.js, and is written in TypeScript with strict mode and full type definitions.

Which frameworks and programming languages are FloodGate built for?

FloodGate includes adapters for Express and Next.js, making it suitable for web frameworks that rely on these platforms. It is also written in TypeScript with strict mode and full type definitions to ensure type safety.

How does FloodGate handle algorithm switching and execution?

All three algorithms run as atomic Lua scripts on Redis, requiring only one round-trip with no race conditions. Users can switch algorithms with a single option change to fit their traffic patterns.

How does the sliding window counter algorithm work?

The sliding window counter approximates a true sliding window by weighting the previous window's count, with an error bounded at ~0.1% at the window boundary. It uses two Redis keys that are hash-tagged to stay on the same slot.

How does the sliding window log algorithm ensure precision?

The sliding window log stores every request timestamp in a sorted set to provide exact counts of requests in the last N milliseconds. It uses a unique nonce to prevent same-millisecond deduplication.

How does the token bucket algorithm manage traffic bursts?

The token bucket allows short bursts up to the bucket capacity while smoothing long-term throughput. Tokens refill at a fixed rate, and there is no burst penalty on cold start.

What mechanism does FloodGate use for atomic Redis operations?

FloodGate uses EVALSHA for atomic, zero-race execution, ensuring that state mutations happen in a single Redis round-trip. This approach eliminates the need for separate INCR and EXPIRE calls.

How does FloodGate recover from Redis script cache issues?

The library handles NOSCRIPT recovery by catching the error when Redis flushes the script cache, reloading via SCRIPT LOAD, and retrying completely transparently to callers.

What use cases is FloodGate best suited for?

FloodGate is designed for high throughput APIs, predictable billing, and rate card enforcement, as well as billing systems, compliance, and low-volume APIs requiring precision.

What production features does FloodGate provide out of the box?

The library is production-ready out of the box, providing real-time observability and cluster safety from the start. It includes features like typed events and discriminated unions for check, blocked, redis:error, and other events.

How can developers get started with FloodGate?

The library is distributed via npm and GitHub, allowing developers to easily install it using the command npm install floodgate-rl. It is open-source and available under the MIT license.

What is the official website of FloodGate?

The official website of FloodGate is floodgate.site.

How is FloodGate rated on Trustburn?

On Trustburn, FloodGate has a rating of 3.4 out of 5 based on 5 reviews.

Based on reviews, listing data and the company's website. Verify anything important with the company directly.

Julian Kress
Reviews 1

The service offering seems well-suited for developers needing precise rate limiting with Redis as a backend. The use of atomic Lua scripts ensures data integrity, which is a strong point for billing and compliance applications. However, while the documentation highlights the ease of starting with a memory backend and scaling to Redis, it remains unclear how the transition affects existing infrastructure without explicit migration guides. The dashboard provides useful metrics, yet the reliance on Next.js 15 for the observability tool might limit compatibility for teams not already using that framework. Overall, it is a competent tool, though the specific operational overhead for non-Redis setups is not entirely defined in the available text.

David Chen
Reviews 1

FloodGate offers a set of tools designed for rate limiting in Node.js applications, utilizing Redis for state management. The available information outlines three algorithms: sliding window counter, sliding window log, and token bucket. Each serves a different purpose, from high-throughput APIs to billing systems requiring exact counts. The system is built with TypeScript and includes middleware for Express and Next.js, which simplifies integration for teams using these frameworks. A key feature is the use of atomic Lua scripts to prevent race conditions, requiring only one round-trip to Redis. The dashboard provides real-time observability, including request counts and block rates. However, the dashboard is built on Next.js 15, which may require specific infrastructure. The documentation mentions a memory backend for easy testing but highlights Redis for distributed environments. Dependencies are minimal, with ioredis listed as an optional peer dependency, which could reduce bundle size for some users.

Elias Thorne
Reviews 1

From the information available, FloodGate presents a robust solution for distributed rate limiting in Node.js environments. The inclusion of three distinct algorithms—sliding window counter, log, and token bucket—provides necessary flexibility for different traffic patterns, whether for high-throughput APIs or billing systems requiring exact accounting. The architecture relies on atomic Lua scripts executed via Redis, ensuring zero race conditions with a single round-trip operation, which appears highly efficient for production-grade deployments. The fact that it is TypeScript-first with strict mode and includes typed events suggests a modern, maintainable codebase. Additionally, the inclusion of drop-in middleware for Express and Next.js, along with a real-time observability dashboard, indicates that the developers have considered the full lifecycle of implementation and monitoring. The handling of edge cases, such as NOSCRIPT recovery after Redis restarts, further reinforces its suitability for reliable, automated systems where uptime is critical.

Mara Veld
Reviews 1

The TypeScript implementation appears comprehensive, with strict mode and clear type definitions for events. Redis cluster safety via hash-tagged keys is a significant advantage for distributed architectures.

Sarah Lin
Reviews 1

The atomic execution via single EVALSHA calls appears efficient. Cluster safety through hash-tagged keys ensures reliability. The TypeScript typing looks thorough for developer experience.

Questions & Answers

No questions yet — be the first to ask.

News & Press

No news yet. This is where the business shares its own updates and press.

Photos

No photos yet. Photos shared by reviewers will show up here.

Widgets

Boost your business trust by displaying widget on your website — its a simple way to convert your visitors into customers.

Embed code

<script src="https://trustburn.com/widgets/index.js"></script>
<div class="trustburn-widget" data-trustburn-protocol="https:" data-trustburn-domain="trustburn.com" data-trustburn-widget="score" data-company-path="floodgate-site" data-lang="en"></div>
More widgets

About FloodGate

FloodGate is an open-source software library that provides distributed rate limiting for Node.js applications. It is MIT licensed and distributed via npm and GitHub. The library implements three rate-limiting algorithms—sliding window counter, sliding window log, and token bucket—executed as atomic Lua scripts on Redis for race-condition-free operation. It is designed to be Redis Cluster-safe and works with ioredis as an optional peer dependency. The project also includes adapters for Express and Next.js, and is written in TypeScript with strict mode and full type definitions.