Viraj Kanwade

Results 38 comments of Viraj Kanwade

It is a manifestation of the starlette BaseHTTPMiddleware. https://github.com/supertokens/supertokens-python/blob/master/supertokens_python/framework/fastapi/fastapi_middleware.py#L28 See https://github.com/tiangolo/fastapi/discussions/6985#discussioncomment-8989601

Ran a simple test ``` from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint from starlette.requests import Request from starlette.types import ASGIApp, Receive, Scope, Send class AsgiMiddleware: def __init__(self, app: ASGIApp) -> None: self.app...

Tried to create a asgi middleware replacement for supertokens fastapi middleware. (its very late for me, sorry if I messed up something.) ``` from typing import Any, Dict, Union from...

https://medium.com/@robbe.sneyders/redesigning-connexion-as-an-asgi-middleware-stack-a5dc17e81ff8 might help on some of the nuances of asgi middleware

@sattvikc you are looking at it from response time side. I am looking at it from infrastructure side. FastAPI by default can handle around 10,000 req/sec. To support 100,000 req/sec,...

@sattvikc Also do look at https://github.com/encode/starlette/discussions/2160#discussioncomment-6053384 > I’m warming up to the idea of not removing it for 1.0. I still think we should discourage its use, but maybe we...

@sattvikc `@app.on_event("startup")` is deprecated, but I was able to get it to work with `lifespan`. Regards