<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: CodingPanda</title>
    <description>The latest articles on DEV Community by CodingPanda (@c0dingpanda).</description>
    <link>https://dev.to/c0dingpanda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1499858%2F16c0b4f3-567d-4f28-baf1-5ba5286c646d.jpeg</url>
      <title>DEV Community: CodingPanda</title>
      <link>https://dev.to/c0dingpanda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/c0dingpanda"/>
    <language>en</language>
    <item>
      <title>Balancing cost and Resilience</title>
      <dc:creator>CodingPanda</dc:creator>
      <pubDate>Thu, 20 Jun 2024 16:06:52 +0000</pubDate>
      <link>https://dev.to/c0dingpanda/balancing-cost-and-resilience-4ido</link>
      <guid>https://dev.to/c0dingpanda/balancing-cost-and-resilience-4ido</guid>
      <description>&lt;p&gt;&lt;strong&gt;Resilience in Cloud Architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Resilience refers to an infrastructure's ability to recover quickly from failures or disruptions and continue operating smoothly. In cloud computing, resilience patterns are designed to ensure that applications remain available and performant even in the face of challenges⁶. When architecting workloads for resilience, several factors come into play:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Design Complexity&lt;/strong&gt;: As system complexity increases, so do the emergent behaviors. Each individual workload component must be resilient, and single points of failure across people, processes, and technology elements should be eliminated. Consider whether increasing system complexity or using a disaster recovery (DR) plan is more effective for meeting your resilience requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost to Implement&lt;/strong&gt;: Higher resilience often involves new software and infrastructure components, which can increase costs. However, these costs should be offset by potential savings from future loss. Shifting mission-critical workloads to the cloud can avoid expensive capital investments in hardware replacement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operational Effort&lt;/strong&gt;: Continuously optimizing deployments, scripting processes, and keeping things simple contribute to operational excellence. Efficiently creating resources and deploying code is crucial for resilience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Effort to Secure&lt;/strong&gt;: Resilience also involves securing your systems. Implementing security measures without compromising availability is essential. Consider encryption, access controls, and monitoring.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Environmental Impact&lt;/strong&gt;: Architecting for resilience affects the environment. Evaluate the trade-offs between resource usage, energy consumption, and sustainability.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Achieving Resilience with Cost Efficiency&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To achieve sweet resilience with minimal cost, consider the following strategies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operational Excellence&lt;/strong&gt;: Continuously optimize deployments, script processes, and keep things simple. The key question is how quickly you can create resources and deploy code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identify Critical Resources&lt;/strong&gt;: Determine which resources are critical for your application. Configure failover and replication for these resources. Most resources can be replicated in a secondary region, ensuring availability even during disasters.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember, achieving the right balance between cost and resilience depends on your specific product and business needs. Assess whether the 4x cost increase for maximum resilience is truly worth it, or if a more cost-effective approach can still provide adequate protection.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>cloud</category>
      <category>design</category>
    </item>
    <item>
      <title>Balancing cost and Resilience</title>
      <dc:creator>CodingPanda</dc:creator>
      <pubDate>Thu, 20 Jun 2024 16:06:32 +0000</pubDate>
      <link>https://dev.to/c0dingpanda/balancing-cost-and-resilience-3e68</link>
      <guid>https://dev.to/c0dingpanda/balancing-cost-and-resilience-3e68</guid>
      <description>&lt;p&gt;&lt;strong&gt;Resilience in Cloud Architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Resilience refers to an infrastructure's ability to recover quickly from failures or disruptions and continue operating smoothly. In cloud computing, resilience patterns are designed to ensure that applications remain available and performant even in the face of challenges⁶. When architecting workloads for resilience, several factors come into play:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Design Complexity&lt;/strong&gt;: As system complexity increases, so do the emergent behaviors. Each individual workload component must be resilient, and single points of failure across people, processes, and technology elements should be eliminated. Consider whether increasing system complexity or using a disaster recovery (DR) plan is more effective for meeting your resilience requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost to Implement&lt;/strong&gt;: Higher resilience often involves new software and infrastructure components, which can increase costs. However, these costs should be offset by potential savings from future loss. Shifting mission-critical workloads to the cloud can avoid expensive capital investments in hardware replacement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operational Effort&lt;/strong&gt;: Continuously optimizing deployments, scripting processes, and keeping things simple contribute to operational excellence. Efficiently creating resources and deploying code is crucial for resilience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Effort to Secure&lt;/strong&gt;: Resilience also involves securing your systems. Implementing security measures without compromising availability is essential. Consider encryption, access controls, and monitoring.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Environmental Impact&lt;/strong&gt;: Architecting for resilience affects the environment. Evaluate the trade-offs between resource usage, energy consumption, and sustainability.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Achieving Resilience with Cost Efficiency&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To achieve sweet resilience with minimal cost, consider the following strategies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operational Excellence&lt;/strong&gt;: Continuously optimize deployments, script processes, and keep things simple. The key question is how quickly you can create resources and deploy code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identify Critical Resources&lt;/strong&gt;: Determine which resources are critical for your application. Configure failover and replication for these resources. Most resources can be replicated in a secondary region, ensuring availability even during disasters.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember, achieving the right balance between cost and resilience depends on your specific product and business needs. Assess whether the 4x cost increase for maximum resilience is truly worth it, or if a more cost-effective approach can still provide adequate protection.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>cloud</category>
      <category>design</category>
    </item>
    <item>
      <title>0 downtime is a myth with deployment slots</title>
      <dc:creator>CodingPanda</dc:creator>
      <pubDate>Mon, 10 Jun 2024 09:54:43 +0000</pubDate>
      <link>https://dev.to/c0dingpanda/0-downtime-is-a-myth-with-deployment-slots-3o7j</link>
      <guid>https://dev.to/c0dingpanda/0-downtime-is-a-myth-with-deployment-slots-3o7j</guid>
      <description>&lt;p&gt;Are you using Azure App service deployment slots? Is it really zero downtime?&lt;/p&gt;

&lt;p&gt;The answer might vary, but my response is both “yes” and “no.” It’s “yes” if you have a &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/SPA"&gt;SPA (Single Page Application)&lt;/a&gt;. However, if you’re dealing with a complex project that has interdependencies among multiple web applications or services, the answer is “no.”&lt;/p&gt;

&lt;p&gt;In my case, we had multiple web services with interdependencies. Our product was a single instance for each customer. Additionally, there were post-deployment jobs to run. Azure App Service takes more time to perform a swap over direct deployment, and the warm-up time for slots can vary. The Infrastructure as Code (IaC) also becomes increasingly complex.&lt;/p&gt;

&lt;p&gt;Our product consisted of around five core components, and we had a database along with custom configurations (not AppSettings or connection strings) that couldn’t be moved to App Service due to legacy support. To update the components, we first had to update the database, which would temporarily bring down the service endpoint. Unfortunately, all workarounds failed to achieve true “zero downtime,” and the custom configurations introduced additional downtimes.&lt;/p&gt;

&lt;p&gt;we were using the staged slots for around 2+ years and we realized the following on slots based deployments&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Overhead and Management:&lt;br&gt;
While deployment slots provide flexibility, managing multiple slots    can introduce additional overhead. Each slot may require separate DNS    records, network rules, SSL certificates, and other configurations.&lt;br&gt;
If you choose separate app services instead of slots, you avoid this    overhead but lose some benefits like seamless swapping and    prewarming.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Complexity in Pipelines:&lt;br&gt;
When using deployment slots in DevOps pipelines, be cautious about swapping across environments. Improper use can lead to unexpected results.&lt;br&gt;
It’s essential to understand the behavior of slots during swaps and ensure proper testing to avoid downtime and longer deployments3.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increased Cost\Time\IaC complexity.&lt;br&gt;
Stage slots demand unique resources apart from prod but that will end up in increasing cost and deployment time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Considering all these challenges, we decided not to use slots. As a result, we observed a drastic increase in deployment speed by 4X, and we reduced costs by almost 1.2X. Instead, we now create a new test infrastructure, test the product, and deploy directly to production&lt;/p&gt;

</description>
      <category>azure</category>
      <category>paas</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Trick to get Free SSL certificate for azure application gateway</title>
      <dc:creator>CodingPanda</dc:creator>
      <pubDate>Mon, 20 May 2024 06:06:21 +0000</pubDate>
      <link>https://dev.to/c0dingpanda/trick-to-get-free-ssl-certificate-for-azure-application-gateway-5b8p</link>
      <guid>https://dev.to/c0dingpanda/trick-to-get-free-ssl-certificate-for-azure-application-gateway-5b8p</guid>
      <description>&lt;p&gt;"We all know that SSL Certificates come with an expiry of 1 year or less. This is because certificates can also be breached or cloned, and it’s a best practice to change the certificate every month. However, if you are purchasing from well-known providers, the minimum duration will be 1 year, and it can be expensive.&lt;/p&gt;

&lt;p&gt;While trying to configure the App Service Certificate, I discovered an impressive solution to this recurring cost - the &lt;a href="https://azure.github.io/AppService/2021/05/25/App-Service-Managed-Certificate-GA.html#:~:text=App%20Service%20Managed%20Certificate%20is%20now%20in%20General,work%20on%20their%20dev%2C%20test%2C%20and%20production%20sites."&gt;App Service Managed Certificate&lt;/a&gt;. This certificate is managed by the app service and is free, but it has some limitations. It doesn’t allow wildcard certificates, and we can’t export it outside of the app service. This is suitable when we only have an app service, but in our architecture, we also have an application gateway that requires a TLS/SSL certificate.&lt;/p&gt;

&lt;p&gt;Upon further research, I found a solution for this. The application gateway can be created with a private certificate, but browsers will not trust this certificate from an unknown CA provider. To avoid this, one has to install this certificate to the trusted root on local machines to allow browsers to trust this certificate.&lt;/p&gt;

&lt;p&gt;Later, I found that there are better, free, automated, and open Certificate Authority (CA) providers, and the best one I found was &lt;a href="https://letsencrypt.org/about/"&gt;LetsEncrypt&lt;/a&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provided by the Internet Security Research Group (ISRG), &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-letsencrypt-certificate-application-gateway"&gt;It can be easily integrated with our Azure Application Gateway&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://intelequia.com/blog/post/automating-azure-application-gateway-ssl-certificate-renewals-with-let-s-encrypt-and-azure-automation"&gt;Certificate renewal can be automated&lt;/a&gt;,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bx2y2srrx988u02gxq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bx2y2srrx988u02gxq5.png" alt="Image description" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;giving us full control over certificate expiry. By this, we can set SSL expiry to 90 days and renew every 60 days or even during every product release, so we never fall into the trap of expiry. Also, the younger the SSL/TLS certificate, the more immune it is against security attacks.&lt;/p&gt;

&lt;p&gt;The App Service Managed Certificate is now in General Availability for both apex domains and sub-domains. This feature allows customers to secure their custom domains on Linux and on Windows with an SSL certificate.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>cloud</category>
      <category>security</category>
      <category>ssl</category>
    </item>
  </channel>
</rss>
