Вопрос

I have a web service. It is deployed on 4 AWS EC2 machines to balance the load from the clients. I'm considering two solutions. One is using the AWS ELB. The other is using node-http-proxy to implement a reverse proxy by myself. It spreads connections across the 4 machines.

Both of them can implement the load balance functionality. I don't know which one is better. AWS ELB may be more robust than the reverse proxy. But reverse proxy solution is cost effective. I don't need to pay for the AWS ELB.

Does anyone can give some comments which solution is better? And why?

Thanks,

Jeffrey

Это было полезно?

Решение

I summarize the article provided by 3boll below. I'm using AWS. And based on the comparison below, I think the ELB is more suitable.

Performance

  • ELB has the best performance.
  • HAProxy is better with small load (less than 30 connections).
  • Nginx is better with heavy load.

SSL support

  • Both ELB and Nginx supports SSL.
  • HAProxy doesn’t support SSL.

Algorithm Options

  • HAProxy has the most options in this arena, support Round-Robin, Least Connection, Weighted and more.
  • Nginx supports Round-Robin and Weighted only.
  • AWS ELB only supports Round-Robin.

Monitoring solution

  • Nginx, being a standard web server, can easily be monitored by any log monitor (e.g. Nagios), additionally, there's a plug-in (which I haven't tried) that looks interesting called Scout.
  • HAProxy is also supported by Scout and there are several other options, including log monitors like Nagios.
  • AWS ELB is supported by CloudWatch, so that's probably the simplest solution over, if you're using AWS.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top