Hello,

I'm looking at https://pkg.go.dev/golang.org/x/net/netutil#LimitListener 
and trying to understand the nuances around the motivation.

It seems from looking at this that the LimitListener will *accept* the 
correct amount of connections, but after that will then leave new clients 
"hanging" without any feedback.

Does it not make more sense to reject the connection as quickly as possible 
instead of expecting the client to timeout? I understand this would mean 
accepting them just to close them , or is this a bad mental model? Does 
this design assume the application will always be receiving new connections?

I ask because I am looking to make a similar custom listener except it will 
be aware that it is part of a load balancer membership and needs to let the 
client know to try again somewhere else immediately because the application 
will be taken out of rotation.

Thoughts?

-Nick

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/56c470c4-1a15-41d7-b7c7-1b5e6ee29a9dn%40googlegroups.com.

Reply via email to