Search code examples
azureload-balancingazure-virtual-machineazure-cloud-servicesazure-virtual-network

Azure architecture design for a load-balanced environment


I'm new to Azure, and a little confused about cloud services.

I'm making a Testing Environment that consist of multiple instances (of the same VM) where each instance has a REST API server (Consisting of 2 API functions: GetResults, SendFileForTesting) and a load-balancer that distributes the requests upon the VMs. In each VM there is also a worker that processes the received files and saves the results in a shared DB.
The goal is, for the file processing to be distributed on the available VMs and the results to be saved in a shared place (So that the "GetResults" request would send all of the results to the client)
This is how it looks:

[LoadBalancer]
     |
[Multiple VM nodes] - (API: GetResult, SendFileForTesting)
     |
[Shared Result DB]

The question is, what is the best way to deploy this on azure?
Right now, I'm trying to create a load-balancer that has 3 clones of the same VM with the same REST API server and another VM that holds the shared DB.
Is there a better way to do this?

Thanks


Solution

  • In my opinion, I think VMSS is the best way to deploy it.

    First, create two Azure VM, one is shared DB, another one is API server. configure API server to connect to shared DB. then capture this VM. After capture completed, we can use template to deploy a VM scale set with this image.

    More information about create custom image, please refer to this link.

    More information about use template to create VMSS with custom image, please refer to this link.
    (this template LB rules is port 80, if you need more ports, please edit this template)