Launch simulations in multiple Availability zones
Related tasks
Context
Simulations can be launched in other AZs, even if the Cloudsim server is not in the same AZ.
Traffic between AZs in us-east-1 has an additional cost of $0.01/GB as specified in the Data Transfer within the same AWS Region section. The bulk of the traffic is done between simulation instances (i.e. in the same AZ), but Cloudsim still listens to some topics, namely /clock and /start. Some logging should be done regarding this to understand if this would pose additional cost.
Some work will be needed on Cloudsim to configure simulation AWS resources to work properly, as Cloudsim is assuming all instances run in the same network. Changes made in this regard should consider the possibility of not using Weave anymore.
Cloudsim needs to be updated to cycle between zones when launch simulations, to make use of the resources available in all AZs.
Change
- Rename AZ env var from
IGN_EC2_AVAILABILITY_ZONE
toIGN_EC2_AVAILABILITY_ZONES
. Comma separated list of AZs. - Rename Subnet env var from
IGN_EC2_SUBNET
toIGN_EC2_SUBNETS
. Comma separated list of subnets. - Replace type of env vars on availability zone and subnets ec2 config.
- Add count of launched simulations
- Implement a round robin algorithm for using different Subnets and Availibity zones
Other information
The lengths of IGN_EC2_AVAILABILITY_ZONES
and IGN_EC2_SUBNETS
must match, otherwise cloudsim will throw an error while creating the EC2 client.