<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>App Service Plan on Journey through Cloud &amp; Code</title><link>https://gurupasupathy.com/tags/app-service-plan/</link><description>Recent content in App Service Plan on Journey through Cloud &amp; Code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 22 Apr 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://gurupasupathy.com/tags/app-service-plan/index.xml" rel="self" type="application/rss+xml"/><item><title>How to get rid of a rouge instance in Azure App Service Plan</title><link>https://gurupasupathy.com/post/2021-04-22_rid-of-a-rouge-instance-in-azure-app-service-plan/</link><pubDate>Thu, 22 Apr 2021 00:00:00 +0000</pubDate><guid>https://gurupasupathy.com/post/2021-04-22_rid-of-a-rouge-instance-in-azure-app-service-plan/</guid><description>&lt;p&gt;&lt;img loading="lazy" src="https://gurupasupathy.com/img/1__Lm11e6NyfH1lBZhwYgObTw.jpeg"&gt;&lt;/p&gt;
&lt;p&gt;If you have been using Azure App Services for a while to host your API, there is a small chance that you would have encountered the issue with a faulty instance. Your API just doesn’t respond or keeps crashing in a particular instance. And, if your ARR Affinity was enabled, your problems will just be exacerbated. Some users will always be routed to the faulty instance.&lt;/p&gt;
&lt;p&gt;AFAIK, there are no straight forward way to release an instance that is allotted to you by Azure for the given App Service Plan. Adding more instances and removing instances (scale out / in) will not guarantee that the rogue instance will be released. I will share the approach I took to get rid of the rogue instance. Note that, the approach below needs your app service to be out of rotation and should not be serving incoming requests.&lt;/p&gt;</description><content:encoded><![CDATA[<p><img loading="lazy" src="/img/1__Lm11e6NyfH1lBZhwYgObTw.jpeg"></p>
<p>If you have been using Azure App Services for a while to host your API, there is a small chance that you would have encountered the issue with a faulty instance. Your API just doesn’t respond or keeps crashing in a particular instance. And, if your ARR Affinity was enabled, your problems will just be exacerbated. Some users will always be routed to the faulty instance.</p>
<p>AFAIK, there are no straight forward way to release an instance that is allotted to you by Azure for the given App Service Plan. Adding more instances and removing instances (scale out / in) will not guarantee that the rogue instance will be released. I will share the approach I took to get rid of the rogue instance. Note that, the approach below needs your app service to be out of rotation and should not be serving incoming requests.</p>
<p>Assume that you suspect that a given instance in your App Service Plan has issues and is crashing frequently and you wish to remove this instance. As of today, there is no way to select an instance and remove it via the Azure Portal (<em>yes, you can stop an instance from Process Explorer, but it would still not get rid of the instance</em>). One way to achieve this would be to use vertical scaling (up/down). When you scale up/down Azure allocates necessary hardware based on the target pricing tier you have chosen. The infrastructure differs significantly across tiers and moving across tiers will almost always guarantee different infrastructure allocation. We will use this to get rid of the rogue instance.</p>
<p>Start by scaling down to a lesser tier (<em>moving laterally within the same tier may not help</em>) For instance, if you are operating on a Premium tier, move to Standard. This action will make Azure allocate new instances in the lesser tier that you have chosen. Now, after scaling down, scale up again to your target pricing tier. When you do this, you are going to be allocated fresh (at least not the old rogue) instances. This is how I got rid of one of the instances that was bothering me.</p>
<p>Hope this helps.</p>
]]></content:encoded></item></channel></rss>