Overview

Traffic Distributor Overview

Traffic Distributor logoOne of the most common problems you can face upon your project growth is the necessity to maintain multiple environments. This may be required for getting enough capacity (to serve all of the clients) or, e.g., for handling different app versions. In this situation you’ll most likely meet the problem of proper traffic distribution between such project copies, including number of aspects like setting proper method for requests routing, servers loading rates, etc. Solving all of these issues can become a challenge even for experienced developers.

So, in order to ease these problems’ resolution, Apiqcloud offers a completely free and easy-to-use solution, based on the automatically configured load balancer. It is delivered as a special Traffic Distributor add-on, which is available for quick one-click installation through Apiqcloud Marketplace and provides smart traffic routing based on your requirements.

How to configure Traffic Distributor

With this solution you are able to set intelligent workloads balancing between pair of hosts and benefit on the following features and opportunities it provides:
  • high availability and advanced failover - share the load among two copies of your application, which could be located on different hardware to achieve better failure protection
  • Blue-Green (zero downtime) application deploy - redirect all incoming requests to a single backend for the time another one is undergoing the maintenance
  • ongoing A/B testing - route the incoming traffic between two different application versions and compare their performance and UX rates to choose the best one for production
  • intuitive UI - configuration form allows to set all the main parameters of your traffic distributor (either during its creation or consequent adjustment), including availability to choose among three different routing types to suit your needs the best: Round RobinSticky Sessions and Failover
  • health check - both backends are automatically checked for a normal response (i.e. for returning 200status code, which indicates that the request was fulfilled) according to the configurable parameters(frequency, timeout, etc.)
  • flexibility & extensibility - beside of the main distribution settings, available by means of add-on’s graphic interface, you are also able to apply any required additional tuning (e.g. to set up caching, TCP mapping, SNI, etc.) via NGINX configuration files manually - no limitations are applied

Generally, compared to running a sole server, Traffic Distributor allows to speed up processing of requests, decrease user’s response delay and, generally, to handle more simultaneous threads without failures.

Routing Methods

With Apiqcloud Traffic Distributor solution you are able to choose among three different routing methods in order to get the one, which will suit your needs the best. Each of the available options has its own specifics and usage purposes, that should be considered during the selection:

  • Round Robin - the most straightforward and oftenly used routing method, which allows to distribute traffic among your environments equally, pointing each request to them in rotation (i.e. one-by-one) due to the set backend priorities.

    Traffic Distributor round robin routing

    Note that to use this option, you should provide the identical content on both of your backends (since the requested by users data is going to be loaded from both of them).
  • Sticky Sessions - this routing type is based on “sticking” each user to a specific backend (according to the set servers’ weights), which will process all their requests until the corresponding user session, created on the first app visit, expires

    Traffic Distributor sticky sessions routing

  • Failover - this kind of traffic routing allows to set the backup copy of your primary server and keep it on a standby (i.e. in reserve) until the first one’s failure. And if some issue occurs with the main backend, all of the requests will be automatically redirected to the working server, so that your users most likely won’t even notice any interruption in the application work.Traffic Distributor failover routing

TD Implementation

All you need to do to get your own Traffic Distributor is to fill in the form with a number of main parameters (like select the hosts to route the requests between, routing type, state traffic ratio, etc) and start installation with a single button. After being created, Traffic Distributor will represent a separate environment with NGINX load balancer server (with predefined amount of nodes) and a special add-on installed on top of it.

Herewith, during installation you also define an entry point for it - i.e. set the requests for being processed either through the Shared Load Balancer or Public IP address(es), attached to each of the balancer nodes.

Tip: Traffic Distributor works by means of commonly used http and https protocols, but is also suitable for any other one, which works over them (including websockets). Herewith, the load balancing itself is performed only during http handshake operation, after which the persistent websockets connection to backend will be established.

In such a way, you can get an extremely flexible Apiqcloud Traffic Distributor tool, intended to help you in accomplishing various goals - starting with a simple routing to achieve even servers loading, till the far more complex scenarios as applying blue-green deployment to install app updates with zero downtime, performing on-going A/B testing, applying advanced failover protection, etc.

 
  • 1 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?