Can I Purchase a Reserved Instance of App Service that Auto Scales up and down on a schedule

Jim Derry 101 Reputation points
2023-02-08T13:15:13.8633333+00:00

We have an App Service that needs more capability for about 12 hours in the workdays, and less during offpeak times and the weekend. I would like to purchase a reserved instance of P2V3 for use during my peak periods, and then auto-scale it down on a schedule during off peaks.

This would help me provide a lot better service and save me some money in the process.

How can I make this happen?

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
946 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,879 questions
0 comments No comments
{count} votes

Accepted answer
  1. Grmacjon-MSFT 16,011 Reputation points
    2023-02-08T17:54:38.63+00:00

    Hi @Jim Derry , You can use Azure Autoscaling to automatically scale your App Service based on a schedule or metrics. You can set up different autoscale profiles for different times of the day or week, and configure rules to scale up or down based on the metrics you choose.

    For example, you can create a profile for your peak periods, where you set the minimum number of instances to 1 and the maximum to 2. Then, you can create a schedule that runs this profile during your peak hours.

    During off-peak times, you can create another profile with a lower minimum and maximum number of instances, and set a schedule for this profile to run during off-peak hours.

    You can also configure rules to scale up or down based on metrics such as CPU usage or memory usage. This way, your App Service will automatically scale up or down based on the current load.

    Hope that helps. Please let us know if you have further questions

    -Grace

     


2 additional answers

Sort by: Most helpful
  1. TP 75,656 Reputation points
    2023-02-08T18:09:44.48+00:00

    Hi,

    Unfortunately you cannot purchase a partial reservation. For example, if you purchase a three year reservation for App Service Premium v3 P2V3 it is valid for 24 hours a day, 7 days a week during the term. If you don't use it 12 hours of a day you would be wasting money during that time (unless you used it for a different app service).

    What you could do is have a script that scales up your App Service for the peak periods during the work week, and then scales it down during off peak and weekends. You would pay full price, but would save money since a lower-price plan would be used during off peak.

    If you had multiple app service plans with non-overlapping peak times purchasing a reservation could save money. For example, say you had two app service plans. The first one had peak time of 9am to 9pm and the second one had peak time of 9pm to 9am. Your script would scale the plans so that only one of them is using the reservation at a time resulting in little to no waste of the reservation.

    It is best to crunch the numbers for your precise scenario to determine if buying a reservation will save you money or not. Sometimes it is cheaper to buy reservation while other times it is cheaper to pay full price and scale up/down as needed.

    If the above is helpful please click Accept Answer.

    Thanks.

    -TP


  2. Jim Derry 101 Reputation points
    2023-02-10T13:07:12.4466667+00:00

    Thanks, TP. We have been testing the P1V3 for over two months already. It doubles our current capacity and a reserved instance will cost us the same as a P2V2. But we're growing and need a way to easily grow our capabilities as they are needed.

    After testing, number crunching, and this discussion (thanks to you and @Grmacjon-MSFT ); it seems like the simplest option for me is to purchase the reserved instance on P1V3, and then scale out to multiple instances as needed.

    The only other option that will give me that V3 power is to scale between a P1V3 at full price and a Standard S1 during off-peak hours. But that adds complexity and I don't think Azure will let me scale between an S1 and a P1V3. am I wrong in that understanding of the scaling?