weidazhao / Hosting

Hosting prototype
170 stars 35 forks source link

Load Balancing Questions #20

Closed steve-torchia closed 8 years ago

steve-torchia commented 8 years ago

1) If I bumped the Gateway Instance Count to something greater than 1 or even set it to -1 in order to have it run on all nodes, will it then be up to the external traffic load balancer to distribute the external traffic load to the gateway instances?

2) When dealing with the external traffic routing I would then need to deal with Azure LB or Traffic manager, correct? (https://azure.microsoft.com/en-us/documentation/articles/application-gateway-introduction)

weidazhao commented 8 years ago

1) Yes, that's the intention of the Gateway middleware. In a non-local-dev environment, the instance count of the gateway should be always set to -1.

2) There is an Azure LB set up in front of Service Fabric cluster by default if you create the cluster from Azure portal. The external traffic always go through Azure LB first before it comes into the cluster in this case. Traffic manager is something you'd put ahead of the Azure LB. The gateway in this repo is a middleware running inside the cluster, responsible for dispatching requests in the Service Fabric manner, while Azure LB only does L4 routing.

steve-torchia commented 8 years ago

Ah ok. So if I wanted to have an outside-facing web-app, I could have that "host" the gateway middleware in order to have it dispatch requests across services in the fabric, right?

weidazhao commented 8 years ago

Yep, that's correct.