简体   繁体   中英

HAProxy with Cloudmap with Fargate

Looking to migrate to using AWS Fargate to host a number of containers to be load balanced via HAProxy, it seems an elegant method to then use a combination of AWS Cloudmap for service discovery and then HAProxy DNS (server-template) syntax to autopopulate the backend servers.

However it's come to attention that route 53 the underlying system of Cloudmap only returns 8 A or SRV records at most which from HAProxy documentation makes it sound like it will continuously mark the nodes not returned in the latest DNS call to be marked as unhealthy which would lead to backends being constantly dropped and re-added to the HAProxy pool even if they're all healthy.

I can only assume this is something others have encountered before and if there's a trick to get ting HAProxy to accomodate for the maximum value of 8 backend servers?

HAProxy supports DNS service discovery with the server-template directive. Make sure you configure a resolvers section and use it with the resolvers directive on the server line. There's a blog post here . If you find that you need to accommodate more records you can adjust the accepted_payload_size size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM