Reputation: 2055
How to run load balancing for App Engine? I faced with a problem that leads to a SOP error for my GWT application on GAE. I suggest that a problem in GAE because it has a few IP for my domain what is cause of cross-site XHR requests I suggest.
Upvotes: 1
Views: 1810
Reputation: 5466
In a clustered environment, Load balancer will receive the requests and then the requests are passed on to the active nodes. Requests are distributed among the cluster based on their loads, for this distribution there are different types of algorithms followed, more interested.
Refer:
https://www.nginx.com/resources/glossary/load-balancing/
http://www.peplink.com/technology/load-balancing-algorithms/
While making requests we don't need to worry about the IP address of the nodes. Since in a cloud based environment, we can drastically increase or decrease the number of nodes for our application based on the traffic. We always point to a fixed url to hit our service and that request when it reaches the load balancer, It is the Load Balancer responsibility to redirect it to an active node which can serve our request.
Same Origin Policy Error:
This will occur when we are trying to access resource of another origin, Even in an same IP address with different ports will also throw SOP error Refer:
Why is same origin policy kicking in when making request from localhost to localhost?
CORS:
Ensure that you have done CORS (Cross Origin Resource Sharing) to fix Same Origin Policy Error,and there are quite number of good tutorials available in the internet to implement CORS, I have listed a few here https://www.eriwen.com/javascript/how-to-cors/
https://staticapps.org/articles/cross-domain-requests-with-cors/
Referential docs https://www.w3.org/TR/cors/ https://spring.io/understanding/CORS
Upvotes: 1