You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried for a while to resolve this, but have not been able to unfortunately. I've also not had much joy from reaching out to the wider HAProxy community for support and was told I should report this as a potential bug. Here is some of the technical information -
I am running HAProxy version: HAProxy version 2.4.24-0ubuntu0.22.04.1 2023/10/31
And Data Plane API version:
HAProxy Data Plane API v3.0.3 f1d4189a
Build date: 2024-10-10T13:42:11Z
One of the reasons we wanted to switch to using the 'AWS EC2 service discovery' with the Data Plane API is so we could minimise our reloads.
But any time I add a new server to one of our Auto scaling groups, HAProxy will reload which is not what should happen according to the below documentation:
"When you register more instances of the same service, the API fills in disabled server slots. You can thus scale up or down without a reload, in most cases."
This is not what is happening for me though. Any scaling event (a new server or terminating one) will generate this in /var/log/dataplaneapi.log
time="2024-12-04T14:41:44Z" level=info msg="Reloaded Data Plane API"
And a corresponding reload that happened to HAProxy (this is from syslog with exact same timestamp),
Dec 4 14:41:44 i-04568442dd67098c5-haproxy-prod systemd[1]: Reloaded HAProxy Load Balancer.
This what my '/etc/haproxy/dataplaneapi.yml' file looks like:
After I set up the Data plane API, it modified my original /etc/haproxy/haproxy.cfg file and put a comment at the top saying it was now managing it. I of course have the relevant tags added to my ASG for this to work, and the backend will automatically be created. In other words adding the below tags:
Results in the backend automatically being created in HAProxy configuration file like below:
If I add a 2nd server, the IP is populated into the HAProxy configuration file as well and the Data Plane API and HAProxy service both reload as soon as it discovers the new instance. I am not able to figure out why it does this. I believed that the idle slots were available and ready to be used and wouldn't require a reload.
Is the HAProxy config. file not meant to be rewrote every time a new server is added to the ASG with the relevant tags?
Please let me know if I can provide any further information. Thank you.
The text was updated successfully, but these errors were encountered:
Hello,
I tried for a while to resolve this, but have not been able to unfortunately. I've also not had much joy from reaching out to the wider HAProxy community for support and was told I should report this as a potential bug. Here is some of the technical information -
I am running HAProxy version:
HAProxy version 2.4.24-0ubuntu0.22.04.1 2023/10/31
And Data Plane API version:
One of the reasons we wanted to switch to using the 'AWS EC2 service discovery' with the Data Plane API is so we could minimise our reloads.
But any time I add a new server to one of our Auto scaling groups, HAProxy will reload which is not what should happen according to the below documentation:
https://www.haproxy.com/documentation/haproxy-data-plane-api/advanced-features/aws-ec2-service-discovery/
It mentions:
"When you register more instances of the same service, the API fills in disabled server slots. You can thus scale up or down without a reload, in most cases."
This is not what is happening for me though. Any scaling event (a new server or terminating one) will generate this in
/var/log/dataplaneapi.log
time="2024-12-04T14:41:44Z" level=info msg="Reloaded Data Plane API"
And a corresponding reload that happened to HAProxy (this is from syslog with exact same timestamp),
Dec 4 14:41:44 i-04568442dd67098c5-haproxy-prod systemd[1]: Reloaded HAProxy Load Balancer.
This what my '/etc/haproxy/dataplaneapi.yml' file looks like:
and this is the Service Discovery file -
After I set up the Data plane API, it modified my original
/etc/haproxy/haproxy.cfg
file and put a comment at the top saying it was now managing it. I of course have the relevant tags added to my ASG for this to work, and the backend will automatically be created. In other words adding the below tags:Results in the backend automatically being created in HAProxy configuration file like below:
If I add a 2nd server, the IP is populated into the HAProxy configuration file as well and the Data Plane API and HAProxy service both reload as soon as it discovers the new instance. I am not able to figure out why it does this. I believed that the idle slots were available and ready to be used and wouldn't require a reload.
Is the HAProxy config. file not meant to be rewrote every time a new server is added to the ASG with the relevant tags?
Please let me know if I can provide any further information. Thank you.
The text was updated successfully, but these errors were encountered: