Skip to main content

Async-native file download routes for Girder, bypassing WSGIMiddleware buffering

Project description

Girder Async Routes

Problem description

When running Girder with gunicorn girder.asgi:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8080, large file downloads experience producer-consumer rate mismatch issues. This occurs because:

  1. Architecture Flow: File downloads → CherryPy (WSGI) → WSGIMiddleware → Starlette (ASGI) → Uvicorn
  2. Sync Generator Issue: The synchronous generator in filesystem_assetstore_adapter.py doesn't properly communicate backpressure to the async framework
  3. Buffering Problems: WSGIMiddleware may buffer entire responses in memory, causing:
    • High memory usage for large files
    • Slow downloads
    • Potential timeouts
    • Worker hangs

This plugin adds support for asynchronous routes in Girder to circumvent these issues and improve performance for large file downloads.

Usage

gunicorn girder_async_routes.asgi:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8080

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

girder_async_routes-0.1.1.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

girder_async_routes-0.1.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file girder_async_routes-0.1.1.tar.gz.

File metadata

  • Download URL: girder_async_routes-0.1.1.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for girder_async_routes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ed06cb739d76a5eed72d8c9956651e276ade693ee19e3e18ddfc1accb79a1cba
MD5 f98980e44badb467e7468a6c4a0348a5
BLAKE2b-256 db2210567cc328994b9bfb8c613e4a4995d9e8b3386e4f8892d9cc3665b3478c

See more details on using hashes here.

Provenance

The following attestation bundles were made for girder_async_routes-0.1.1.tar.gz:

Publisher: release.yml on Xarthisius/girder-async-routes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file girder_async_routes-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for girder_async_routes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48705ef2574212e21001bc639d1930c28497a3892b7c9b9ba97b8f8bfccaa33a
MD5 35ba888d7d3c336caf4305c7e0d8c94f
BLAKE2b-256 f3439b63ce8948de9ba0a7c99f3688157d1e8b23cad1e8ccf2ecc98dbb179fd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for girder_async_routes-0.1.1-py3-none-any.whl:

Publisher: release.yml on Xarthisius/girder-async-routes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page