Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference Between TCP Load Balancer and HTTP Load Balancer and when to use what?

I am trying to understand fundamental use cases between these two and when to prefer one over the other.

  1. For example HAProxy support TCP load balancing. In practical cases when this would be a deciding factor?
  2. Also What HTTP LB can achieve TCP can not and vice versa
  3. Any reference architecture

Any relevant link with practical use case example would be great

like image 533
Abhijit Mazumder Avatar asked Sep 09 '14 11:09

Abhijit Mazumder


People also ask

What is the difference between network load balancer and HTTP load balancer?

While the global HTTPS load balancer is for Layer-7 traffic and is built using the Google Front Engines at the edge of Google's network. The regional network load balancer is for Layer-4 traffic and is built using Maglev.

Which load balancer is best suited for load balancing of TCP traffic?

If you need to load balance HTTP requests, we recommend you use the Application Load Balancer (ALB). For network/transport protocols (layer4 – TCP, UDP) load balancing, and for extreme performance/low latency applications we recommend using Network Load Balancer.

What are the three types of load balancers?

Elastic Load Balancing supports the following types of load balancers: Application Load Balancers, Network Load Balancers, and Classic Load Balancers.


2 Answers

  1. For example HAProxy support TCP load balancing. In practical cases when this would be a deciding factor?

You would probably use this if you are using sockets/comet/full-duplex

  1. Also What HTTP LB can achieve TCP can not and vice versa

Currently HAproxy is the most reliable LB on the market for TCP and websockets.

  1. Any reference architecture

This would give you a start http://highscalability.com/blog/2014/8/11/the-easy-way-of-building-a-growing-startup-architecture-usin.html

like image 134
Gene Diaz Avatar answered Oct 13 '22 04:10

Gene Diaz


TCP load balancing is pretty simple and yet powerful, it can be implemented at layer 4 (LVS) or layer 7 (HAProxy). An HTTP load balancer is a reverse proxy that can perform extra actions on http traffic, i.e. re-write sections of the traffic and inserting cookies etc. You only need a HTTP if you need one and if you don't you don't. (I'm sure that sentence almost makes sense).

like image 21
Malcolm turnbull Avatar answered Oct 13 '22 05:10

Malcolm turnbull