-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
In Kubernetes environment, we use service to load balance nginx traffic accross several php-fpm traffic.
Today this load balancing is using default Round Robin algorithm.
Nginx proposes another alogirthm which checks which php-fpm use the least number of connections.
I never tried but I supposed it could help to distribute the traffic more equally according the current resources usage of php-fpm pods.
I know it's possible to create a new preset, that could define it'sown upstream config file, but I would to avoid this path, to keep the actual really configuration of drupal 11.
According what I understood we just need to add this param least_conn in the upstream block
upstream php_backend {
# Add the least_conn directive here
least_conn;
# Use the Kubernetes Service Name (e.g., 'php-fpm-service')
# Nginx will resolve this to the pod IPs in the Service
server php-fpm-service:9000;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels