fractal-code / meteor-azure

Automate Meteor deployments on Azure App Service
MIT License
67 stars 20 forks source link

How does Azure handle a failed instance? #40

Closed guilhermedecampo closed 7 years ago

guilhermedecampo commented 7 years ago

Given the deployment was done correctly and you have your app running fine.

If one user action crash the meteor server for any reason what azure does?

What are your experience about this?

Thanks @ramijarrar.

ramijarrar commented 7 years ago

In the case of an application error, Azure will automatically reroute to a healthy instance (assuming you've provisioned another one).

In more advanced scenarios (e.g setting up regional failover or changing the load balancing method), you can configure Traffic Manager.

guilhermedecampo commented 7 years ago

It's just a matter of having 2 instances of the application? Do you have a documentation for that? Found this one

ramijarrar commented 7 years ago

That page is for Azure VMs (which are much lower level), you can view the relevant documentation for App Service platform here.

From https://stackoverflow.com/questions/30403214/does-an-azure-web-app-care-if-its-instances-are-healthy-unhealthy:

Yes, Azure Web Apps monitors the health of the workers by making internal requests to it and verifying that they're healthy:

However, we don't check status codes that the web app returns to user requests (like 500, etc) since that could easily be an app specific issue rather than a problem with the machine.

So the answer you're looking for is: We continuously test whether or not the instances (VMs) are healthy and take them down if they're not. However, those tests do not rely on error codes the customer's site returns.

ramijarrar commented 7 years ago

Also, for the application itself: we are running in IISNode, which manages the Node process (this includes handling things like crashes, code updates, etc.).

ramijarrar commented 7 years ago

Closing this, please re-open if you have any further queries.