How can Apache cause repeated requests?

I have two Rails applications that talk to each other. Several times a day, requests from Appendix A are displayed in duplicate (or in triplicate / four copies) in Appendix B. All incoming and incoming requests are logged. Logs show that application A sends one outgoing request, and this application B receives this request twice or more in the same second.

Appendix B is behind Apache and Amazon's load balancing balancer.

I'm not sure where to look or even what questions to ask in order to alienate the question of what might cause this problem. If you need more data, I would be happy to provide it.

+7
ruby-on-rails apache nginx
source share
1 answer

Retries most likely go beyond balancing the load balancing of Amazon or a network component (such as a router). I have seen similar behavior when using other load balancers (e.g. Citrix NetScaler).

Basically, a request receives an idle timeout at some level in the request chain. If this timeout does not send the proper HTTP 5xx status to the client (for example, it can just close the connection), then any components between the timeout source and the client may decide to retry the request depending on how they are configured.

Keeping track of which components trigger retries can be very difficult. My recommendation is to make sure your Rails applications always respond quickly to each other. If the requests cannot be completed quickly, consider a background / polling solution or a non-HTTP communication method (e.g. WebSockets).

+1
source share

All Articles