Repository navigation
Description
I have been evaluating the ELBs that we are using in the AWS account. Currently, we have reached the maximum usage level of the Classic Load Balancer (layer 7). We can certainly request an increase in the ELB quota on our AWS account. However, since there are more improvements around Kubernetes, there is another option, such as ingress-nginx, that might be better in terms of cost and efficiency.
Currently, our services are deployed on Kubernetes, which creates an ELB (Classic Load Balancer - layer 7) to serve each service. These endpoints have the following format: a2f5cfcb3114947d797....xx.elb.us-east-1.amazonaws.com, and subsequently, these endpoints are assigned to a subdomain, such as nominatim-api.openhistoricalmap.org or nominatim-api-staging.openhistoricalmap.org.
The other option, is to use ingress-nginx, The ingress-nginx in Kubernetes acts as an ingress controller that uses NGINX as a reverse proxy server and load balancer. it works with Network Load Balancer (NLB) (layer 4) in AWS.
The current cost for types of ELB in us-east-1 region.
| Load Balancer Type | Hourly Rate | Per Unit Data |
|---|---|---|
| Classic Load Balancer | $0.025 | $0.008 per GB of data processed |
| Network Load Balancer | $0.0225 | $0.006 per NLCU-hour (or partial hour) |
Using Network Load Balancer would lead to significant cost reductions because we would need only two NLBs. Instead of having multiple ELBs for different services, we can use a single ingress controller to manage traffic for multiple services. It means we only need to pay for two(production and staging) load balancer instead of several.
I have bee testing it, some of these in development environment here the results,
- https://web.dev.openhistoricalmap.org/
- https://nominatim-api.dev.openhistoricalmap.org/
- https://overpass-api.dev.openhistoricalmap.org/
The only disadvantage would be that some of our endpoints, such as those for the API nominatim-api-staging, will change to nominatim-api.staging. However, the main domains may be a bit tricky, which we could discuss.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsIn Production
Activity
batpad commentedon Mar 23, 2024
@Rub21 I don't think it should be a problem for the domains - we can just make separate DNS records for the domains in Route53 and point it to the Cluster IP - like we don't HAVE TO manage the DNS in the ingress controller, it should also be fine to manage DNS in Route53 and point to the Cluster IP (if I'm understanding the issue correctly).
This is really good work @Rub21 ! Happy to chat next week to outline steps to move to the
ingress-nginxcontroller - in general I think this is a good idea!1ec5 commentedon Mar 23, 2024
I suppose this would make #719 more straightforward too.
Rub21 commentedon Mar 28, 2024
Progress is happening here: osm-seed/osm-seed#319