<p>There are 2 ways I can think of to solve this problem:</p>
<ul>
<li><p>You can use your own data points from your own experience or others: One datapoint I can provide is ~70,000 sessions per month, probably 50 connections per page request, 1MB page size and maybe 1.5-2 pages per session was running on Nginx 1.14 on a t3.medium. I don't recall ever getting charged for CPU credits, so the CPU usage can't have been ever above 20% over 24h. I do recall upgrading from t3.small at some point, so it must have been memory usage. ~200 vhosts and their TLS certificates.</p>
</li>
<li><p>You can use Route53 weighted routing and distribute the traffic to say a c6gn.xlarge (to be super save) and a t4g.medium and then slowly dial up the percentages and watch CPU, memory, network and disk throughput until you notice bottlenecks.</p>
</li>
</ul>

CC BY-SA 4.0
2022-07-07T07:55:58.263Z
2022-07-07T07:55:58.263Z
jdog
<p>What kind of parameters can be used to estimate how much memory and the number of CPU cores are required for a load balancer?<br />
I have a requirement to setup LB based on Nginx to route the traffic to other nodes via TCP/IP as on other nodes that have PHP-FPM installed. SSL will terminate at Nginx and traffic to nodes is to be based on just HTTP. Max timeout to be five minutes.</p>
<p>I am unable to understand how many requests this Nginx LB can swiftly serve while running on a c6gn.medium (1vCPU,2GB Memory, network bandwidth up to 25GBPS) which is CPU optimized and a t4g.medium which is a burstable instance having 2 vCPU and 4GB memory. Cheers!</p>

CC BY-SA 4.0
2022-07-06T15:16:31.040Z
I would say set it up and test. It's extremely unlikely nginx is going to be a performance bottleneck in this setup. If you want HA, you need two instance meaning this setup will likely be more expensive and less reliable than just using an AWS managed load balancer.
jordanm
CC BY-SA 4.0
2022-07-12T20:44:51.720Z
@Ankur, have you checked my answer?
jdog
CC BY-SA 4.0
2022-07-15T09:11:51.117Z
@jdog yes I did
Ankur
CC BY-SA 4.0
2022-07-15T21:35:41.687Z
@Ankur, if it solves your problem I would appreciate if you accepted it.
jdog
<amazon-web-services><amazon-ec2><nginx><load-balance><loadbalancing>
AWS- How to estimate a server configuration for nginx load balancer?
Ankur
# AWS- How to estimate a server configuration for nginx load balancer?

(Asked by: username_0 on 2022-07-06)

What kind of parameters can be used to estimate how much memory and the number of CPU cores are required for a load balancer?  
I have a requirement to setup LB based on Nginx to route the traffic to other nodes via TCP/IP as on other nodes that have PHP-FPM installed. SSL will terminate at Nginx and traffic to nodes is to be based on just HTTP. Max timeout to be five minutes.

I am unable to understand how many requests this Nginx LB can swiftly serve while running on a c6gn.medium (1vCPU,2GB Memory, network bandwidth up to 25GBPS) which is CPU optimized and a t4g.medium which is a burstable instance having 2 vCPU and 4GB memory. Cheers!

**Tags:** amazon-web-services, amazon-ec2, nginx, load-balance, loadbalancing

> **Comments:**
> **username_1**: I would say set it up and test. It's extremely unlikely nginx is going to be a performance bottleneck in this setup. If you want HA, you need two instance meaning this setup will likely be more expensive and less reliable than just using an AWS managed load balancer.  
> **username_2**: @username_0, have you checked my answer?  
> **username_0**: @username_2 yes I did  
> **username_2**: @username_0, if it solves your problem I would appreciate if you accepted it.  

---

## 1 answers

### Answer by username_2 on 2022-07-07. Score: 0

There are 2 ways I can think of to solve this problem:

* You can use your own data points from your own experience or others: One datapoint I can provide is ~70,000 sessions per month, probably 50 connections per page request, 1MB page size and maybe 1.5-2 pages per session was running on Nginx 1.14 on a t3.medium. I don't recall ever getting charged for CPU credits, so the CPU usage can't have been ever above 20% over 24h. I do recall upgrading from t3.small at some point, so it must have been memory usage. ~200 vhosts and their TLS certificates.
* You can use Route53 weighted routing and distribute the traffic to say a c6gn.xlarge (to be super save) and a t4g.medium and then slowly dial up the percentages and watch CPU, memory, network and disk throughput until you notice bottlenecks.


---

