Run application on multiple locations and Pay as You Go

6/20/2020
<p>Hey guys I need advice in order to make the right architectural decision.</p> <p>I need to be able to run the console application (or docker container in the future) on different locations (Countries/Citys) without paying for hundreds always running virtual machines.</p> <p>In other words, I need to press the button and run the application for a couple of hours on a server in New York, next press, and the same application will be run in Stambul. </p> <p>The straight forward approach is to buy hundreds of virtual machines, but there are two problems with it:</p>
  • It's too expensive.
  • Probably only a couple of them will be used but I'll have to pay for all of them.

<p>What can you recommend? </p> Does Azure support it? Or maybe AWS?
-- Evgeny Bychkov
amazon-web-services
azure
cloud
docker
kubernetes

1 Answer

6/20/2020

First thing, cloud service provider work base on the region instead of a city like you mentioned new york etc but you can choose always nearest region to the country/city in which you want to run your application. you can also try cloudping or aws cloudping for nearest region.

In other words, I need to press the button and run the application for a couple of hours on a server in New York, next press, and the same application will be run in Stambul.

So I will recommend docker container as you want to run the same application in a different region so instead of mainain AMI better to go with the container.

AWS fargate is designing for pay as you go purpose along with zero server maintenance mean you just need to specify the docker image and run your application, rest AWS will take care of the resources.

AWS Fargate is a serverless compute engine for containers that works with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS). Fargate makes it easy for you to focus on building your applications. Fargate removes the need to provision and manage servers, lets you specify and pay for resources per application, and improves security through application isolation by design.

like you mentioned

without paying for hundreds always running virtual machines.

So you do not need pay, you will only pay for the compute hours that used by your application when you start/run the container.

With AWS Fargate, there are no upfront payments and you only pay for the resources that you use. You pay for the amount of vCPU and memory resources consumed by your containerized applications.

AWS Fargate pricing

For deployment purpose, I will recommend terraform so you will only need to create resources for region and for the rest of the region you can make it parameterized.

-- Adiii
Source: StackOverflow