Logo

dev-resources.site

for different kinds of informations.

How to increase AWS ELB keep-alive timeout when deployed from Traefik

Published at
7/6/2024
Categories
aws
traefik
kubernetes
Author
francoislp
Categories
3 categories in total
aws
open
traefik
open
kubernetes
open
Author
10 person written this
francoislp
open
How to increase AWS ELB keep-alive timeout when deployed from Traefik

Let's see together how to change the Load balancer settings when created from an ingress controller like Traefik on Kubernetes.

The default timeout of the AWS Elastic Load Balancer (ELB) is 60 seconds. For some use cases (like long LLM calls) this might be too short and you might want to increase it.

When deploying Traefik on Kubernetes, it might be hard to find the right configuration to increase the keep-alive timeout on the ELB, as Traefik is the one creating the ELB.

Well, after some searches it is pretty easy to change it. You need to add the right annotation on the Kubernetes Service with the type Load Balancer.

Here is the documentation with available annotations: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/guide/service/annotations/

With the Traefik Helm chart, it is as simple as updating this values.yaml file:

service:
  #    https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/guide/service/annotations/#resource-attributes
  annotations:
    # 2 minutes
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: '120'
Enter fullscreen mode Exit fullscreen mode

Some examples of configuration used with nginx ingress controller: https://github.com/zephyrproject-rtos/infrastructure/blob/4b767ceec69f725614ded3dcb715c8ebffeadc83/terraform/zephyr-aws-blueprints/helm_values/nginx-values.yaml#L4

And that's it!

traefik Article's
30 articles in total
Favicon
How to Set Up Laravel in a Subfolder Using Traefik
Favicon
Traefik using owned SSL certificate
Favicon
Traefik Cloudflare DNS Challenge
Favicon
Docker for Load Balancing: Scaling Applications Efficiently
Favicon
Comprehensive Guide to Setting Up Load Balancing with Traefik, Docker, Django, and React
Favicon
ForwardAuth with Traefik: Streamlining Security for Microservices
Favicon
Opening Pandora's Container - Gaining Host Access (Part 2)
Favicon
ForwardAuth with Traefik: Streamlining Security for Microservices
Favicon
Effortless Next.js Deployment with Docker, Traefik, and GitHub Actions: A Complete Hosted Solution
Favicon
Traefik Proxy Guide: Configuring public Domain Names for Docker Containers
Favicon
Setting Up a Multi-Purpose Server with Amazon EC2, Docker, and Traefik
Favicon
Traefik with docker compose
Favicon
Setting Up Traefik and mkcert for Local Development
Favicon
How to increase AWS ELB keep-alive timeout when deployed from Traefik
Favicon
Boost Your DevOps Workflow with Traefik
Favicon
Auto-route multiple web projects using Traefik
Favicon
My Github Actions workflow for deploying web projects
Favicon
Adding a new Ghost via docker-compose to your traefik setup
Favicon
Exposing public applications on AWS EKS with Traefik
Favicon
K3s Traefik Ingress - configured for your homelab!
Favicon
Traefik Proxy e Amazon ECS
Favicon
Random 1: Traefik blocks CORS by Default
Favicon
Instalando Zabbix Server com MySQL, Grafana e Traefik em Docker
Favicon
NGINX vs. Traefik vs. Istio — Unlocking the Secrets to Mastering Kubernetes Ingress
Favicon
Easy steps to install K3s with SSL certificate by traefik, cert manager and Let’s Encrypt
Favicon
Customizing error pages in Traefik v.2
Favicon
Redirect HTTP to HTTPS and WWW to Non-WWW with Traefik 3
Favicon
Deploying a Medusa + Minio + MeiliSearch stack with Docker and Traefik
Favicon
Централизованное логирование
Favicon
ECS Anywhere & Traefik Proxy with ECS Compose-X

Featured ones: