whatisgithub

What is concurrency-limits?

netflix/concurrency-limits — explained in plain English

Analysis updated 2026-07-16 · repo last pushed 2026-01-16

3,588JavaAudience · developerComplexity · 3/5QuietLicenseSetup · moderate

In one sentence

A Java library that automatically adjusts how many concurrent requests a service handles, based on real-time latency measurements, so systems stay fast and avoid crashing under load.

Mindmap

mindmap
  root((repo))
    What it does
      Auto-tunes request limits
      Prevents overload crashes
      Uses real-time latency
    Algorithms
      Vegas
      Gradient2
    Integrations
      gRPC
      Servlets
      Client or server side
    Use cases
      Protect live traffic
      Throttle batch jobs
      Auto-scaling services
    Audience
      Distributed systems teams
      Backend developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Protect a live-user-facing service from being overwhelmed by background batch jobs.

USE CASE 2

Automatically throttle incoming requests on a gRPC server before latency degrades.

USE CASE 3

Prevent a client service from sending too many concurrent calls to a downstream dependency.

USE CASE 4

Enforce priority-based limits so critical traffic is protected while less important work is throttled.

What is it built with?

JavagRPCServlets

How does it compare?

netflix/concurrency-limitsnekogram/nekogramalibaba/alink
Stars3,5883,6123,616
LanguageJavaJavaJava
Last pushed2026-01-16
MaintenanceQuiet
Setup difficultymoderatemoderatehard
Complexity3/53/54/5
Audiencedeveloperdeveloperdata

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Java and familiarity with a supported framework like gRPC or servlets to wire the limiter into request handling.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Netflix's concurrency-limits is a Java library that helps online services automatically figure out how many requests they can handle at the same time without slowing down or crashing. Instead of setting a fixed cap on requests per second, which quickly becomes outdated as systems scale up or down, the library continuously measures and adjusts the limit in real time based on actual conditions. The core idea borrows from how internet traffic control works. Rather than counting total requests, it focuses on concurrent in-flight requests. When too many requests pile up, latency increases and queues form. The library detects this by watching latency measurements and rejection signals, then adjusts the allowed concurrency up or down. It includes algorithms like Vegas, which estimates queue buildup by comparing current latency to the minimum observed, and Gradient2, which smooths out spikes using two averaging windows to spot real trends versus noise. This is useful for teams running distributed services that auto-scale, where nobody can manually track every server's capacity. For example, a service handling both live user traffic and batch jobs could use this to guarantee live traffic gets 90% of capacity while batch gets 10%, so real users aren't starved during heavy background processing. It works with common communication frameworks including gRPC and standard web servlets, and can be deployed on either the server side to protect a service or the client side to prevent one service from overwhelming another. What stands out is the shift from static configuration to adaptive, measurement-based limits. Each node in a system makes its own local decisions based on what it observes, which is more practical than trying to coordinate limits across a large fleet of machines. The library also supports priority-based enforcement, so critical traffic can be protected while less important work gets throttled first.

Copy-paste prompts

Prompt 1
I have a gRPC service in Java that sometimes gets overloaded during traffic spikes. Show me how to integrate Netflix concurrency-limits to automatically adjust the concurrent request limit and reject excess requests before latency degrades.
Prompt 2
My service handles both live user traffic and batch background jobs. How do I configure concurrency-limits with priority groups so live traffic gets 90% of capacity and batch gets 10%?
Prompt 3
Explain the difference between the Vegas and Gradient2 algorithms in Netflix concurrency-limits and help me choose which one to use for my Java service that auto-scales on AWS.
Prompt 4
I want to use concurrency-limits on the client side so my service doesn't overwhelm a downstream API. Give me a code example of setting up a client-side limiter with the Gradient2 algorithm.

Frequently asked questions

What is concurrency-limits?

A Java library that automatically adjusts how many concurrent requests a service handles, based on real-time latency measurements, so systems stay fast and avoid crashing under load.

What language is concurrency-limits written in?

Mainly Java. The stack also includes Java, gRPC, Servlets.

Is concurrency-limits actively maintained?

Quiet — no commits in 6-12 months (last push 2026-01-16).

What license does concurrency-limits use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is concurrency-limits to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is concurrency-limits for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.