Routing method – weighted

When you want to distribute traffic evenly or based on predefined weights, the weighted routing method is something you are looking for. Using that method, you define weights, which are then taken into consideration when deciding where a request should be routed. Let's take into consideration the following table:

Endpoint Weight Status
Server A 100 Online
Server B 100 Degraded
Server A - staging 5 Online

In the preceding example, we have three endpoints, one of which is reporting issues. Although both Server A and Server B have the same weights, as Server B's status is reported as degraded, it will not be considered as a healthy endpoint, and as a result, a user will not be routed to it. There are two ...

Get Hands-On Azure for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.