Closed futurist closed 1 month ago
See https://github.com/cloudflare/pingora/issues/245#issuecomment-2129977269. Disconnect is tracked via the drop of the Tracer
object.
Also note that connected_to_upstream
will happen for both new connection and reused one. The Tracer object is designed to track both connect and disconnect at connection level.
What is the problem your feature solves, or the need it fulfills?
We have many websocket servers, using Pingora as gateway, want to release some resource when idle(no client connected)
Describe the solution you'd like
I have this
ConnectionManager
to manage all Clients and Connections. For example, client "abc" maybe have 1,2,3 connections.The
ConnectionManager
will track connection come and go, when a client's connection is 0, will release all resources related to that client.The question is: ProxyHTTP trait method
connected_to_upstream
maybe used for track connect, but I don't find method fordisconnect
, can add a method for this or there's already one?