crunchy-proxy icon indicating copy to clipboard operation
crunchy-proxy copied to clipboard

Add monitoring endpoints

Open SuperQ opened this issue 7 years ago • 2 comments

I was looking at this as an option to replace pgbouncer, but one of the main reason I want to replace pgbouncer is the minimal instrumentation it has.

I'm interested in adding Prometheus client_golang and pprof to this code in order to better monitor it in production.

Does this sound like a good idea?

SuperQ avatar Apr 13 '19 15:04 SuperQ

Having more metrics for monitoring purposes would certainly be a nice thing to have. Currently, the admin interface provides a 'stats' command that returns a simple count of how many queries have been sent to each node, but that's about as far as it goes currently.

I'd certainly be in favor of adding better monitoring to a list of improvements. Though, given the current design, I believe a significant bit of refactoring would need to occur before such an endpoint could be provided.

abrightwell avatar Apr 13 '19 15:04 abrightwell

It should be reasonably easy. There are several methods for mixing gRPC and HTTP on the same port. For example, cmux. Then we can have the admin port handle both gRPC calls and the HTTP needed for monitoring endpoints.

SuperQ avatar Apr 13 '19 16:04 SuperQ