Repository navigation
Conversation
Contributor
Dash performance benchmarks
growth = late-third / early-third per-op time; ~1 is flat, a large value means the per-op cost scales with accumulated state. machine scale vs baseline: 0.81x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



With redis-py 8,
RedisSharedStoragestreaming callbacks fail under load withMaxConnectionsError: Too many connections.redis-py 8 lowered a pool's default
max_connectionsfrom 2**31 to 100 and raises once all 100 are busy. Dash built each event loop's async client with defaults, so a burst of pumps publishing at once failed. The pump's terminaldoneframe most likely failed the same way, so the browser waited until it timed out. With 4 uvicorn workers at 2000 streaming browsers, 7% of streams failed. On redis-py 5.2.1 the same run had no errors.The async client now uses a
BlockingConnectionPoolof 100 connections that waits up to 20 s for a free one. This covers both theurlpath and the passed-clientpath. Redis still sees a bounded number of connections per worker. A 400-connection pool gave no measurable gain on the same load.Load test (4 uvicorn workers, redis-py 8.1.0, 20 frames per stream): no errors at 2000 or 4000 browsers.
Test:
test_async_burst_larger_than_the_pool_waits_for_connectionsintests/shared_storage/test_redis_backend.pyruns 500 concurrent async calls through the url and passed-client paths. It fails without the fix.