1
votes

Azure Cloud Services have auto-scale based on CPU / Queue. We have a set of machines running API for uploading and processing files. Although we moved the processing part on Worker Role that scale depending on the queue size, the servers but also take care of the upload while responding to other operations like downloading.

Right now we're using more machines for the just in case scenario, but we want to build a way to scale and to be cost-efficient while having a great upload experience for our users.

What would your approach be for creating a way to detect the network usage across all machines from the same Cloud Service and auto-scale if necessary?

1

1 Answers

1
votes

I would: 1) Create metrics that calculate the amount of time it takes to download/upload a file. 2) Aggregate the metrics in some persistence layer (we have plenty in Azure) 3) Create a service that looks those metrics 4) Check the thresholds 5) Use the Management Libraries for .NET to trigger scaling on the Cloud Service(s) affected.

This approach also scales with your solution. You can eventually separate the scaling part from the checking part and have them as two different services, communicate asynchronously.

We also have an old, open source now project that does some of that for you, so you don't have to reinvent the wheel. It's called WASABi. Be careful though as this is not maintained anymore but as I said, you can use it as inspiration.