Skip to content

Conversation

@RealOrangeOne
Copy link
Contributor

Replaces #5

Features:

  • Nicely logs the hostname the request is for
  • asyncio-based, so has higher throughput, and doesn't get locked down when more than 4 requests come in at once
  • Streaming requests, so the router doesn't internally buffer things
  • Returns server: crab header
  • Uses uvicorn, a production-grade server, rather than a dev server

router.py Outdated
HEADERS_TO_STRIP = ["server", "date"]


client = httpx.AsyncClient()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

httpx's default timeout is 5 seconds. Need to use timeout=None i think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants