I have a feedback form on server A. Due to heavy traffic I want to redirect some of these POST requests to another server B based on the category of feedback (a field in the post form).
The problem is the feedback form is distributed across multiple mobile applications and is hard-coded now. We cannot change anything in the Form post now.
What is the best approach? Is it possible to do using DNS redirection? I would ideally like that before the request reaches the Apache server to increase the load, the redirection happens. Please suggest.
Ideally you need to change the form (not the actual form itself, but supporting code). The idea is to add some JavaScript, that upon submitting a form checks that “category” field and changes the value of form’s “action” attribute making it submitted to a desired server.
If that is cannot be done at all (for whatever reason), then this may be implemented on server side. Instead of hitting
Server Adirectly, it should hitServer Zero— a load balancer, which then can route the request further based on the logic you provide: e.g. 1) choose less busy server; 2) randomly choose server; 3) analyse POST form data and choose right server; 4) other options. #2 can be implemented via DNS (an example is available in the link below).Any load balancer should be able to implement options 1 & 2. For other options you have to check if specific load balancer (software or hardware) supports it (check feature list).
Links: