Question

Understanding TCP loadbalancers

Hi, I’m using TCP loadbalancers (happen to be within my DOKS cluster).

I have several questions:

  • The pricing says 10k simultaneous connections and 10k requests per second. Connections makes sense for TCP, but I assume 10k requests does not apply (as in, it’s not HTTP, it’s just a stream)
  • I see 250 SSL connection per second - I assume that does not apply if I terminate the SSL/TLS connection myself in the k8s cluster?
  • Using TCP, is there any sort of timeout? As in, if both the client and server have the connection open - I presume the connection will never terminate (beyond a potential load balancer restart/update)?
  • What is the behaviour if the connection limit is hit (obviously I can buy more, but I may still hit a limit)? Are new connections rejected? Are old connections somehow chosen to be dropped?
  • Any update to exporting load balancer metrics? (e.g. https://www.digitalocean.com/community/questions/getting-or-exporting-load-balancer-metrics).

Thanks!

Kyle


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
February 15, 2024

Hey Kyle!

I’ll try to cover your questions in order:

  1. 10k Simultaneous Connections vs. 10k Requests per Second: The DigitalOcean Load balancers run on the transport layer of the OSI model, handling connections rather than individual requests. This means the 10k simultaneous connections are about how many live connections can be maintained at once. The 10k requests per second metric is more aligned with HTTP/S traffic, where the focus is on how many individual requests (like web page loads or API calls) can be handled every second.

  2. 250 SSL Connections per Second: This limit is about new SSL/TLS connections being established per second. If you’re terminating SSL/TLS at the load balancer, this metric is applies because it affects how quickly new secure connections can be set up. However, if you’re handling SSL/TLS termination within your Kubernetes cluster (e.g., at an ingress controller), then this metric does not directly apply to you since the load balancer is not performing the SSL termination.

  3. TCP Timeout Behavior: When a load balancer’s connection remains idle for 60 seconds, it times out and responds with a 504 Gateway Timeout error. If your application requires longer than 60 seconds to respond, you can increase the load balancer’s timeout settings in its Settings tab.

  4. Behavior at Connection Limit: As you mentioned, load balancers have a maximum number of simultaneous connections they can maintain. If this number is exceeded, the underlying TCP connection is closed. Because DigitalOcean Load Balancers operate on the transport layer of the OSI model, they do not return an HTTP code when a connection is refused due to maximum capacity.

  5. Exporting Load Balancer Metrics: Unfortunately, it’s not possible at the moment to directly export load balancer metrics from the DigitalOcean interface.

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel