<?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: Bugra Derre</title>
    <description>The latest articles on DEV Community by Bugra Derre (@bugra_derre).</description>
    <link>https://dev.to/bugra_derre</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%2F423532%2Fa4616820-c938-4f71-af24-2eef57509eca.png</url>
      <title>DEV Community: Bugra Derre</title>
      <link>https://dev.to/bugra_derre</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bugra_derre"/>
    <language>en</language>
    <item>
      <title>Introduce Chaos Platform 2.0 for Azure</title>
      <dc:creator>Bugra Derre</dc:creator>
      <pubDate>Sun, 24 Jan 2021 13:26:37 +0000</pubDate>
      <link>https://dev.to/bugra_derre/introduce-chaos-platform-2-0-for-azure-bpa</link>
      <guid>https://dev.to/bugra_derre/introduce-chaos-platform-2-0-for-azure-bpa</guid>
      <description>&lt;p&gt;You develop systems? You operate them on Microsoft Azure? Then this post is for you.&lt;/p&gt;

&lt;p&gt;Offering highly available systems means building resilient systems. Architecting your system to expect failure is a core approach nowadays. Chaos engineering embraces the uncertainty and aims at anticipate rare, unpredictable, and disruptive outcomes, so that you can minimize any potential impact on your customers.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;good&lt;/strong&gt;: you can improve resiliency. Be proactive and embrace failure. Harden your system by breaking it. Do small steps and minimize your blast radius. A bunch of chaos engineering tools will assist you.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;bad&lt;/strong&gt;: most of the tools require a new learning curve, another portal to log in or installing some black box agents on your virtual machine.&lt;/p&gt;

&lt;p&gt;As the existing tooling was too complex for us, we decided to build our own easy-to-use Chaos Platform that focuses on and fully integrates itself into Azure and Azure DevOps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1_I4qESw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uzgv873u8fmrvrxjgqey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1_I4qESw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uzgv873u8fmrvrxjgqey.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need for a new learning curve - the &lt;strong&gt;Chaos Platform GUI&lt;/strong&gt; is easy to use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatize your resilience&lt;/strong&gt; with the well-known Azure pipeline tasks - we built it for you&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentless approach&lt;/strong&gt; - we fully exploit the potential of the Azure API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safely minimize your blast radius&lt;/strong&gt; with application level attacks, rather than blowing your virtual machine.&lt;/li&gt;
&lt;li&gt;Build &lt;strong&gt;trust incrementally&lt;/strong&gt;. Run Azure resource attacks, when you established a fundamental confidence on your system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy to turn failures into resilience with Proofdock Chaos Platform. Check out &lt;a href="https://medium.com/proofdock/introducing-chaos-platform-2-0-for-azure-f8df0eceb340"&gt;the full article&lt;/a&gt; or jump directly into &lt;a href="https://marketplace.visualstudio.com/items?itemName=proofdock.chaos-platform"&gt;Chaos Platform in the Azure DevOps Marketplace&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are happy to get feedback from you. We are Proofdock and enthusiastic about fresh ideas and feedback to improve ourselves.&lt;/p&gt;




&lt;p&gt;Cover image is provided by &lt;a href="https://unsplash.com/@brett_jordan"&gt;Brett Jordan&lt;/a&gt; on &lt;a href="https://unsplash.com/"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>resilience</category>
      <category>sre</category>
    </item>
    <item>
      <title>Introduce Chaos Middleware for Python Flask: Simulate disruptions to improve resiliency</title>
      <dc:creator>Bugra Derre</dc:creator>
      <pubDate>Mon, 28 Sep 2020 05:44:24 +0000</pubDate>
      <link>https://dev.to/proofdock/introduce-chaos-middleware-for-python-flask-simulate-disruptions-to-improve-resiliency-3alp</link>
      <guid>https://dev.to/proofdock/introduce-chaos-middleware-for-python-flask-simulate-disruptions-to-improve-resiliency-3alp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Resiliency&lt;/strong&gt; is key to software nowadays. It contributes to your application's reliability and plays a major role in the &lt;a href="https://medium.com/proofdock/how-chaos-engineering-increases-your-competitiveness-d83caa6ce2cb" rel="noopener noreferrer"&gt;competitive advantage of your business&lt;/a&gt;. Resilient applications smartly exploit the strengths of software patterns that handle timeouts, delays and faulty service responses.&lt;/p&gt;

&lt;p&gt;Great authors and presenters like &lt;a href="https://www.slideshare.net/ufried/" rel="noopener noreferrer"&gt;Uwe Friedrichsen&lt;/a&gt; and &lt;a href="https://insights.sei.cmu.edu/author/donald-firesmith/" rel="noopener noreferrer"&gt;Donald Firesmith&lt;/a&gt; share their ideas and knowledge about &lt;strong&gt;resilient software design&lt;/strong&gt;. Such articles describe software patterns that overcome disruptions and improve application resiliency in a handsome way.&lt;/p&gt;

&lt;p&gt;However, deploying a resilience pattern requires you as a developer to &lt;strong&gt;verify your implementation&lt;/strong&gt;. When touching the ground of verification, things appear to get difficult.&lt;/p&gt;

&lt;p&gt;Chaos engineering tools advertise features like stopping a virtual machine, or to terminate pods in your Kubernetes cluster. The "blast radius" gets high here. Higher than a developer expects when exploring a resilience design pattern on Friday afternoon at 2PM.&lt;/p&gt;

&lt;p&gt;That is where the &lt;code&gt;Chaos Middleware&lt;/code&gt; package goes into action. The &lt;a href="https://ucare.cs.uchicago.edu/pdf/socc14-cbs.pdf" rel="noopener noreferrer"&gt;Cloud Bug Study&lt;/a&gt; states, that neglected error handling - buggy code, timeouts, and others - leads to a great portion of a system's unavailability.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Chaos Middleware&lt;/code&gt; allows you to throw your application at turbulent conditions. It lets you simulate delayed responses or raise errors. Activate disruptions when needed and narrow them down on specific URL paths. The &lt;code&gt;Chaos Middleware&lt;/code&gt; gives you the opportunity to minimize the "blast radius" and verify your application's resilience, even on a Friday afternoon.&lt;/p&gt;

&lt;p&gt;The next sections will guide you through &lt;em&gt;i)&lt;/em&gt; the installation and configuration process in your Flask application &lt;em&gt;ii)&lt;/em&gt; and the simulation of delays and application faults. Simulations are enabled by HTTP header requests or by the &lt;a href="https://docs.proofdock.io/chaos/guide/" rel="noopener noreferrer"&gt;&lt;code&gt;Chaos Platform&lt;/code&gt;&lt;/a&gt; control panel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation &amp;amp; configuration
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install the &lt;code&gt;Chaos Middleware&lt;/code&gt; for the Flask application:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/your/flask-application  &lt;span class="c"&gt;# Enter your Flask application&lt;/span&gt;
 venv/bin/activate  &lt;span class="c"&gt;# Active virtual environment&lt;/span&gt;
 pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; proofdock-chaos-middleware-flask
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure the Flask application:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt; &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;
 &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pdchaos.middleware.contrib.flask.flask_middleware&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FlaskMiddleware&lt;/span&gt;

 &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;CHAOS_MIDDLEWARE_APPLICATION_NAME&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;example-application-name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
 &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;CHAOS_MIDDLEWARE_APPLICATION_ENV&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;example-environment&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
 &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;CHAOS_MIDDLEWARE_PROOFDOCK_API_TOKEN&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;eyJ0eXAi...05&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

 &lt;span class="n"&gt;middleware&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FlaskMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

 &lt;span class="c1"&gt;# Your business logic here
&lt;/span&gt;
 &lt;span class="nd"&gt;@app.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/products&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, from the products&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start your application&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Simulate delays
&lt;/h2&gt;

&lt;p&gt;Trigger delays by setting the &lt;code&gt;x-proofdock-attack&lt;/code&gt; request header. The &lt;code&gt;Chaos Middleware&lt;/code&gt; detects any value inside this header. &lt;/p&gt;

&lt;p&gt;Set the header's value to &lt;code&gt;{"actions":[{"name":"delay","value":"15"}]}&lt;/code&gt;. The value describes the simulation &lt;code&gt;name&lt;/code&gt; and its &lt;code&gt;value&lt;/code&gt; in seconds. The described simulation delays the response by 15 seconds.&lt;/p&gt;

&lt;p&gt;For the simulation, we use the Postman client to visualize the HTTP requests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdp143wjlxyd7fnqd1e1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdp143wjlxyd7fnqd1e1.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A delay simulation&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Simulate faults
&lt;/h2&gt;

&lt;p&gt;Raise exceptions by setting the &lt;code&gt;x-proofdock-attack&lt;/code&gt; request header.&lt;/p&gt;

&lt;p&gt;Set the header's value to &lt;code&gt;{"actions":[{"name":"fault","value":"Exception"}]}&lt;/code&gt;. The value describes the simulation &lt;code&gt;name&lt;/code&gt; and its &lt;code&gt;value&lt;/code&gt; as a fully qualified name of the exception to be raised. The simulation will raise the &lt;code&gt;Exception&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi76rumlxvwjg3rdi2e1c.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi76rumlxvwjg3rdi2e1c.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A fault simulation&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A control panel for Azure DevOps users
&lt;/h2&gt;

&lt;p&gt;A more appealing way to control such attacks is the usage of the control panel provided by Proofdock's &lt;a href="https://docs.proofdock.io/chaos/guide/" rel="noopener noreferrer"&gt;&lt;code&gt;Chaos Platform&lt;/code&gt;&lt;/a&gt;. The &lt;code&gt;Chaos Platform&lt;/code&gt; extends the Azure DevOps with chaos engineering capabilities. The control panel allows you to control application attacks via a graphical user interface and lets your application cache the configured attack. Check out the &lt;a href="https://docs.proofdock.io/chaos/guide/" rel="noopener noreferrer"&gt;&lt;strong&gt;docs&lt;/strong&gt;&lt;/a&gt; when you are interested in the &lt;code&gt;Chaos Platform&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4xs9vhcsdtmqp83tffan.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4xs9vhcsdtmqp83tffan.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The control panel in Azure DevOps&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank you
&lt;/h2&gt;

&lt;p&gt;We hope you had fun and learned some new aspects on resilience.&lt;/p&gt;

&lt;p&gt;We are &lt;a href="https://proofdock.io" rel="noopener noreferrer"&gt;&lt;strong&gt;Proofdock&lt;/strong&gt;&lt;/a&gt;, a software tech company located in Germany helping engineers build more resilient and reliable software products. Check out the &lt;a href="https://marketplace.visualstudio.com/items?itemName=proofdock.chaos-platform" rel="noopener noreferrer"&gt;&lt;strong&gt;Chaos Platform&lt;/strong&gt;&lt;/a&gt; for Microsoft Azure and explore your system.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check out the source code at &lt;a href="https://github.com/proofdock/chaos-middleware-python/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.proofdock.io/" rel="noopener noreferrer"&gt;Read the docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=proofdock.chaos-platform" rel="noopener noreferrer"&gt;&lt;code&gt;Chaos Platform&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flask</category>
      <category>resilience</category>
      <category>chaos</category>
      <category>devops</category>
    </item>
    <item>
      <title>Chaos Middleware: Simulate disruptions in Django applications to improve resiliency</title>
      <dc:creator>Bugra Derre</dc:creator>
      <pubDate>Tue, 08 Sep 2020 05:38:03 +0000</pubDate>
      <link>https://dev.to/proofdock/chaos-middleware-simulate-disruptions-in-django-applications-to-improve-resiliency-j8h</link>
      <guid>https://dev.to/proofdock/chaos-middleware-simulate-disruptions-in-django-applications-to-improve-resiliency-j8h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Resiliency&lt;/strong&gt; is key to software nowadays. It contributes to your application's reliability and plays a major role in the &lt;a href="https://medium.com/proofdock/how-chaos-engineering-increases-your-competitiveness-d83caa6ce2cb"&gt;competitive advantage of your business&lt;/a&gt;. Resilient applications smartly exploit the strengths of software patterns that handle timeouts, delays and faulty service responses.&lt;/p&gt;

&lt;p&gt;Great authors and presenters like &lt;a href="https://www.slideshare.net/ufried/"&gt;Uwe Friedrichsen&lt;/a&gt; and &lt;a href="https://insights.sei.cmu.edu/author/donald-firesmith/"&gt;Donald Firesmith&lt;/a&gt; share their ideas and knowledge about &lt;strong&gt;resilient software design&lt;/strong&gt;. Such articles describe software patterns that overcome disruptions and improve application resiliency in a handsome way.&lt;/p&gt;

&lt;p&gt;However, deploying a resilience pattern requires you as a developer to &lt;strong&gt;verify your implementation&lt;/strong&gt;. When touching the ground of verification, things appear to get difficult.&lt;/p&gt;

&lt;p&gt;Chaos engineering tools advertise features like stopping a virtual machine, or to terminate pods in your Kubernetes cluster. The "blast radius" gets high here. Higher than a developer expects when exploring a resilience design pattern on Friday afternoon at 2PM.&lt;/p&gt;

&lt;p&gt;That is where the &lt;code&gt;Chaos Middleware&lt;/code&gt; package goes into action. The &lt;a href="https://ucare.cs.uchicago.edu/pdf/socc14-cbs.pdf"&gt;Cloud Bug Study&lt;/a&gt; states, that neglected error handling - buggy code, timeouts, and others - leads to a great portion of a system's unavailability.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Chaos Middleware&lt;/code&gt; allows you to throw your application at turbulent conditions. It lets you simulate delayed responses or raise errors. Activate disruptions when needed and narrow them down on specific URL paths. The &lt;code&gt;Chaos Middleware&lt;/code&gt; gives you the opportunity to minimize the "blast radius" and verify your application's resilience, even on a Friday afternoon.&lt;/p&gt;

&lt;p&gt;The next sections will guide you through &lt;em&gt;i)&lt;/em&gt; the installation and configuration process in your Django application &lt;em&gt;ii)&lt;/em&gt; and the simulation of delays and application faults. Simulations are enabled by HTTP header requests or by the &lt;a href="https://docs.proofdock.io/chaos/guide/"&gt;&lt;code&gt;Chaos Platform&lt;/code&gt;&lt;/a&gt; control center.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation &amp;amp; configuration
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install the &lt;code&gt;Chaos Middleware&lt;/code&gt; for the Django application:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/your/django-application  &lt;span class="c"&gt;# Enter your Django application&lt;/span&gt;
 venv/bin/activate  &lt;span class="c"&gt;# Active virtual environment&lt;/span&gt;
 pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; proofdock-chaos-middleware-django
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure the Django application:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt; &lt;span class="c1"&gt;# Activate the ``Chaos Middleware`` component by adding 
&lt;/span&gt; &lt;span class="c1"&gt;# it to the MIDDLEWARE list in your Django settings
&lt;/span&gt; &lt;span class="n"&gt;MIDDLEWARE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
   &lt;span class="s"&gt;'..'&lt;/span&gt;
   &lt;span class="s"&gt;'pdchaos.middleware.contrib.django.django_middleware.DjangoMiddleware'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="s"&gt;'..'&lt;/span&gt;
 &lt;span class="p"&gt;]&lt;/span&gt;

 &lt;span class="c1"&gt;# Set the Chaos Middleware settings
&lt;/span&gt; &lt;span class="n"&gt;CHAOS_MIDDLEWARE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="s"&gt;'CHAOS_MIDDLEWARE_APPLICATION_NAME'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'example-application-name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="s"&gt;'CHAOS_MIDDLEWARE_APPLICATION_ENV'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'example-environment'&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start your application&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Simulate delays
&lt;/h2&gt;

&lt;p&gt;Trigger delays by setting the &lt;code&gt;x-proofdock-attack&lt;/code&gt; request header. The &lt;code&gt;Chaos Middleware&lt;/code&gt; detects any value inside this header. &lt;/p&gt;

&lt;p&gt;Set the header's value to &lt;code&gt;{"actions":[{"name":"delay","value":"15"}]}&lt;/code&gt;. The value describes the simulation &lt;code&gt;name&lt;/code&gt; and its &lt;code&gt;value&lt;/code&gt; in seconds. The described simulation delays the response by 15 seconds.&lt;/p&gt;

&lt;p&gt;For the simulation, we use the Postman client to visualize the HTTP requests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bRb5hdjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w7uglr5q1rn8t1q2uvh7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bRb5hdjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w7uglr5q1rn8t1q2uvh7.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A delay simulation&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Simulate faults
&lt;/h2&gt;

&lt;p&gt;Raise exceptions by setting the &lt;code&gt;x-proofdock-attack&lt;/code&gt; request header.&lt;/p&gt;

&lt;p&gt;Set the header's value to &lt;code&gt;{"actions":[{"name":"fault","value":"Exception"}]}&lt;/code&gt;. The value describes the simulation &lt;code&gt;name&lt;/code&gt; and its &lt;code&gt;value&lt;/code&gt; as a fully qualified name of the exception to be raised. The simulation will raise the &lt;code&gt;Exception&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vvtMFVju--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3px8lpxht1q2goiv091r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vvtMFVju--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3px8lpxht1q2goiv091r.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A fault simulation&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A control center for Azure DevOps users
&lt;/h2&gt;

&lt;p&gt;A more appealing way to control such attacks is the usage of the control center provided by Proofdock's &lt;a href="https://docs.proofdock.io/chaos/guide/"&gt;&lt;code&gt;Chaos Platform&lt;/code&gt;&lt;/a&gt;. The &lt;code&gt;Chaos Platform&lt;/code&gt; extends the Azure DevOps with chaos engineering capabilities. The control center allows you to control application attacks via a graphical user interface and lets your application cache the configured attack. Check out the &lt;a href="https://docs.proofdock.io/chaos/guide/"&gt;&lt;strong&gt;docs&lt;/strong&gt;&lt;/a&gt; when you are interested in the &lt;code&gt;Chaos Platform&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ad43WpPg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4xs9vhcsdtmqp83tffan.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ad43WpPg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4xs9vhcsdtmqp83tffan.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The control center in Azure DevOps&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank you
&lt;/h2&gt;

&lt;p&gt;We hope you had fun and learned some new aspects on resilience.&lt;/p&gt;

&lt;p&gt;We are &lt;a href="https://proofdock.io"&gt;&lt;strong&gt;Proofdock&lt;/strong&gt;&lt;/a&gt;, a software tech company located in Germany helping engineers build more resilient and reliable software products. Check out the &lt;a href="https://marketplace.visualstudio.com/items?itemName=proofdock.chaos-platform"&gt;&lt;strong&gt;Chaos Platform&lt;/strong&gt;&lt;/a&gt; for Microsoft Azure and explore your system.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check out the source code at &lt;a href="https://github.com/proofdock/chaos-middleware-python/"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.proofdock.io/"&gt;Read the docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=proofdock.chaos-platform"&gt;&lt;code&gt;Chaos Platform&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>django</category>
      <category>resilience</category>
      <category>chaos</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
