Repository navigation
Make shared storage opt-in, move msgspec to extras - #4095
Merged
Merged
Conversation
Dash() no longer starts shared storage or the multiplexed streaming downlink unless shared_storage= or DASH_SHARED_STORAGE is set. Streaming callbacks still work on a per-callback connection without it. msgspec moves from install requirements to the new dash[shared_storage] extra (persistent LocalSharedStorage modes) and to dash[diskcache] and dash[redis]. Without it, in-memory LocalSharedStorage falls back to JSON on its socket transport.
Contributor
Dash performance benchmarks✅ all within thresholds
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.62x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on |
KoolADE85
approved these changes
Oct 28, 2026
|
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.



Shared storage and the streaming downlink it powers (#3930, #3931) were on by default for every app. To keep upgrades from changing how existing deployments run, both are now opt-in, and
msgspecis no longer a hard dependency.Changes
Dash()has no shared storage unlessshared_storage=is passed orDASH_SHARED_STORAGEis set. An unset, empty ornonevalue disables it, andlocalturns it on. Streaming callbacks still work without it, each on its own connection, as before.msgspecmoves out of the install requirements:dash[shared_storage]extra brings it for the persistentLocalSharedStoragemodes (persist,persist-reset).dash[diskcache]anddash[redis]each include it, so those backends work from their own install.LocalSharedStoragestill works across workers, and its socket transport falls back to stdlib JSON.ImportErrornaming the extra to install, so the stored format never depends on what happens to be installed.Tests
tests/shared_storage/test_no_msgspec.pyruns with msgspec blocked. It checks that memory mode works between two processes over JSON, and that each lasting backend raises the right extra's error.test_stwg004runs 4 gunicorn workers with msgspec blocked and a browser streaming across them.test_downlink_without_shared_storage_is_rejectedcovers the 403 on Flask, FastAPI and Quart.LocalSharedStorageexplicitly.