Geo-scaling Applications
This article explains how to use the Nex!™ PaaS to scale applications across multiple geographies and/or data centers. Note that geo-scaling is only available if Nex!™ has been deployed in multiple data center locations.
1 - Context
The Nex!™ PaaS can be deployed on multiple data center locations using the same IaaS provider (e.g. AWS) or different IaaS providers (e.g. AWS + Azure + On-Premise). Once setup in multiple data centers it becomes very easy to deploy applications and addons across multiple locations to increase the overall performance of your applications in multiple geographies.
2 - Geo-scaling applications
The easiest way to get started with geo-scaling is to use the nex-cli.
To know the list of regions you can deploy to simply run the following commands:
# List all the compute racks in all regions nex-cli racks --type compute +---------+-----+----------------+--------+---------+------------+-----+----------+--------------+---------------------+ | Compute Racks | +---------+-----+----------------+--------+---------+------------+-----+----------+--------------+---------------------+ | TYPE | ID | REGION | STACK | STATUS | IIP | EIP | CAPACITY | MACHINE SIZE | MACHINE ID | +---------+-----+----------------+--------+---------+------------+-----+----------+--------------+---------------------+ | compute | 333 | ap-southeast-1 | docker | running | 10.30.3.145 | - | 256/256 | m3.xlarge | i-nb4nb777 | | compute | 444 | ap-southeast-1 | docker | running | 10.30.3.111 | - | 190/256 | m3.xlarge | i-c1cxc47x | | compute | 555 | ap-southeast-2 | docker | running | 10.30.2.74 | - | 255/256 | m3.xlarge | i-er7e87e8 | | compute | 666 | us-west-2 | docker | running | 10.30.3.41 | - | 14/256 | m3.xlarge | i-cvc4vc87 | +---------+-----+----------------+--------+---------+------------+-----+----------+--------------+---------------------+
You can then configure your application or addons to be scaled in multiple regions using the following commands
# Configure your application to be deployed in all regions in a round # robin fashion nex-cli apps:update myapp --region-balancing=all # Configure your application be scaled in specific regions # and twice as much in us-west-2 than in ap-southeast-1 nex-cli apps:update myapp --region-balancing="ap-southeast-1=1,us-west-2=2"
# Configure your addon to be deployed in all regions in a round # robin fashion nex-cli addons:update myaddon --region-balancing=all # Configure your addon be scaled in specific regions # and twice as much in us-west-2 than in ap-southeast-1 nex-cli addons:update myaddon --region-balancing="ap-southeast-1=1,us-west-2=2"