Answers: <p>All three are patterns of sorts, it isn't is a case of picking and choosing which to use in any specific circumstance but a case of knowing when to recognise the patterns that can help or hurt you.</p>
  
  <h1>Snowflake Server</h1>
  
  <p>A <a href="https://martinfowler.com/bliki/SnowflakeServer.html" rel="nofollow noreferrer">Snowflake Server</a> is very much an anti-pattern representing the case when a server evolves in an uncontrolled manner to the point when it cannot be easily reproduced.</p>
  
  <p>I have had numerous run-ins with this kind of server in production, they are fairly easy to spot as there is usually a large number of failed changes and comments such as "it [the change] worked in Development/Test/UAT/Staging".</p>
  
  <h1>Phoenix Servier</h1>
  
  <p>A <a href="https://martinfowler.com/bliki/PhoenixServer.html" rel="nofollow noreferrer">Phoenix Server</a> is more of a principal than a pattern as Martin Fowler puts it:</p>
  
  <blockquote>
    <p>A server should be like a phoenix, regularly rising from the ashes.<sup>[a]</sup></p>
  </blockquote>
  
  <p>If you were to apply IT Service Management (ITSM) or ITIL language to the same situation you would likely call it an <a href="https://www.enisa.europa.eu/topics/threat-risk-management/risk-management/current-risk/bcm-resilience/bc-plan/it-service-continuity-plan" rel="nofollow noreferrer">IT Service Continuity Plan</a> or Recovery Plan:</p>
  
  <blockquote>
    <p>A separate plan for each service should provide detailed procedures and step-by-step guidelines for each stage of an incident so that the Recovery Teams are able to restore the services and thereby to meet the agreed process and component RTOs.</p>
  </blockquote>
  
  <h1>Immutable Server</h1>
  
  <p>An <a href="https://martinfowler.com/bliki/ImmutableServer.html" rel="nofollow noreferrer">Immutable Server</a> or <a href="https://www.oreilly.com/ideas/an-introduction-to-immutable-infrastructure" rel="nofollow noreferrer">Immutable Infrastructure</a> is the process by which we treat all deployed infrastructure, configuration and code as utterly immutable, i.e. unchanging. When we deploy anything new we spin up new infrastructure and deploy the code to this.  Interestingly this mostly satisfies the needs traditionally fulfilled by <a href="https://blog.juriba.com/evergreen-it-concept-or-reality" rel="nofollow noreferrer">Evergreening</a>.</p>
  
  <hr>
  
  <h2>Notes</h2>
  
  <ul>
  <li><strong>a:</strong> Martin's colleague <a href="https://twitter.com/kornys" rel="nofollow noreferrer">Kornelis Sietsma</a> came up with the term "Phoenix Server" on an internal discussion list.</li>
  </ul>
  
Answers: CC BY-SA 3.0
Answers: 2017-04-28T23:11:57.960Z
Answers: 2017-04-28T23:11:57.960Z
Answers: Richard Slater
Answers: <p>As I was more thinking of a listing of advantages and drawbacks of each type, here's is my view (not exhaustive, it's the important operational ones in my opinion):</p>
  
  <ol>
  <li><p><strong>Snowflakes Servers</strong></p>
  
  <ul>
  <li><p><strong>What they are</strong>: Systems with their specific configuration, no other servers in the data centre have the exact same parameters. They are usually manually administered.</p></li>
  <li><p><strong>Advantages</strong>: </p>
  
  <ul>
  <li>Fitted to the needs of what's running on them.  </li>
  <li>Long-lived, updates are usually shorts.</li>
  <li>Adapted to special cases where the tweaks are well documented by the product hosted.</li>
  </ul></li>
  <li><p><strong>Drawbacks</strong>:</p>
  
  <ul>
  <li>Sometimes updates leave unused files, the cleanup could be complex.  </li>
  <li>When the changes have to be made to multiples machines it takes a while.  </li>
  <li>Nothing prevents undocumented change.   </li>
  <li>In the case of corruption, you have to rebuild a base OS and restore, some OS tweaks can't be restored and should be reapplied, it's easy to slip over a line and forget an important tweak.</li>
  <li>Usually long to provision due to the manual configuration.</li>
  </ul></li>
  </ul></li>
  <li><p><strong>Phoenix Servers</strong></p>
  
  <ul>
  <li><strong>What they are</strong>: Automatically configured by some code.</li>
  <li><p><strong>Advantages</strong>:</p>
  
  <ul>
  <li>Defined by code, version-able.   </li>
  <li>Easily replicated to a point in time.  </li>
  <li>Long-lived, short updates also.  </li>
  <li>Changes to controlled files are documented and can't be forgotten.</li>
  </ul></li>
  <li><p><strong>Drawbacks</strong>:</p></li>
  <li>Sometimes updates leave unused files, the cleanup could be complex.  </li>
  <li>Not everything is under code management, some tweaks by a human can be missed if not included into the automation.</li>
  </ul></li>
  <li><p><strong>Immutable Servers</strong></p>
  
  <ul>
  <li><strong>What they are</strong>:
  
  <ul>
  <li>Automated one-time provisioning from a master image with generally no access.</li>
  </ul></li>
  <li><p><strong>Advantages</strong>:</p>
  
  <ul>
  <li>Defined by code, version-able.  </li>
  <li>Easily replicated to a point in time.  </li>
  <li>Reduced attack surface due to the usual removal of remote access.</li>
  <li>Fixed configuration, no change can break something</li>
  <li>Easily scalable 'on demand' from the master image.</li>
  </ul></li>
  <li><p><strong>Drawbacks</strong>:</p>
  
  <ul>
  <li>They are immutable, you have to ensure you can roll an update quickly in case of a 0day flaw impacting you.  </li>
  <li>Not all applications fit well inside this model (Databases, for example, a complete replace on same data is not always possible, there's migration to handle).  </li>
  <li>Brings some new challenges for forensic analysis of crash and log management.</li>
  </ul></li>
  </ul></li>
  </ol>
  
  <p>None of those patterns is exclusive, you have to chose the best one according to your actual need. Snowflakes bring a lot of concerns in case of recovery after a disaster so the choice is usually more between Phoenix and Immutable.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-03-14T16:44:14.233Z
Answers: 2017-04-28T22:37:31.090Z
Answers: 2017-04-28T22:37:31.090Z
Answers: Tensibai
Answers: <p>The term Phoenix Server was coined by a fellow of Martin Fowler, and all three terms described in short articles on Martin's bliki.</p>
  
  <ul>
  <li><a href="https://martinfowler.com/bliki/SnowflakeServer.html" rel="noreferrer">Snowflake Server</a></li>
  <li><a href="https://martinfowler.com/bliki/PhoenixServer.html" rel="noreferrer">Phoenix Server</a></li>
  <li><a href="https://martinfowler.com/bliki/ImmutableServer.html" rel="noreferrer">Immutable Server</a></li>
  </ul>
  
  <p>The pros and cons of each such server are described in the articles. The main difference being in the way the server is managed.</p>
  
  <p>Servers exist to fulfill the role of a container for some application(s). Since applications change often, it is often required to change some attributes of the container - such as packages, configuration, etc. It is also sometimes required to change attributes of the container itself because of external reasons, such as security vulnerabilities that require patches to be installed.</p>
  
  <p>There are several ways to change an existing server:</p>
  
  <ol>
  <li>Manually create the server initially, then keep changing its content (mutating) each time a change is required.</li>
  <li>"Bake" an image for a server based on a recipe, usually in an automated way (not manually). Then create servers from that image. And repeat this process on every change.</li>
  </ol>
  
  <p>The former is called Snowflake, while the latter is a practice that allows Phoenix and Immutable server types. Where Immutable states that no changes are made to an existing server once it was created, and Phoenix means that a server is destroyed completely and a new one is used to replace it during the change process.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-11-15T19:48:50.437Z
Answers: If you create an image in fact it would be immutable, not phoenix, phoenix will run configurations against nodes, looking for configuration states.
Answers: Renato Prado
Answers: CC BY-SA 4.0
Answers: 2022-11-15T23:45:17.877Z
Answers: It depends on which way you chose to use, way #1 or way #2. In both you create an image, but after it is created the usage of that image is different.
Answers: Evgeny Zislis
Answers: CC BY-SA 4.0
Answers: 2022-11-16T12:48:10.117Z
Answers: But ansible for example would be used as a phoenix server and it doesn´t create an image, we don´t consider it a manually change, right?
Answers: Renato Prado
Answers: CC BY-SA 3.0
Answers: 2017-03-01T01:55:28.197Z
Answers: 2017-03-07T14:39:19.590Z
Answers: 2017-03-07T14:39:19.590Z
Answers: Evgeny Zislis
Body: <p>I'm curious about a matrix like comparison on security/ease of management/forensic ability for each type of server. I may forget some more key features of each type also.</p>
  
  <p>I've a general idea about the types but a reference matrix would be of help when choosing between them on some cases (when the automation become complex for the application for example).</p>
  
  <p>To avoid concern about it being too broad, I feel that splitting it in multiples question would scatter the information and that a question about security comparison would need to compare each type also.</p>
  
Tags: <servers><architecture>
Title: What are the pro and cons of SnowFlakes Servers, Phoenix Servers and Immutable Servers?
UserDisplayName: Tensibai
ThreadText: # What are the pro and cons of SnowFlakes Servers, Phoenix Servers and Immutable Servers?
  
  (Asked by: username_0 on 2017-02-28)
  
  I'm curious about a matrix like comparison on security/ease of management/forensic ability for each type of server. I may forget some more key features of each type also.
  
  I've a general idea about the types but a reference matrix would be of help when choosing between them on some cases (when the automation become complex for the application for example).
  
  To avoid concern about it being too broad, I feel that splitting it in multiples question would scatter the information and that a question about security comparison would need to compare each type also.
  
  **Tags:** servers, architecture
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2017-03-01. Score: 17 | Accepted answer
  
  The term Phoenix Server was coined by a fellow of Martin Fowler, and all three terms described in short articles on Martin's bliki.
  
  * [Snowflake Server](https://martinfowler.com/bliki/SnowflakeServer.html)
  * [Phoenix Server](https://martinfowler.com/bliki/PhoenixServer.html)
  * [Immutable Server](https://martinfowler.com/bliki/ImmutableServer.html)
  
  The pros and cons of each such server are described in the articles. The main difference being in the way the server is managed.
  
  Servers exist to fulfill the role of a container for some application(s). Since applications change often, it is often required to change some attributes of the container - such as packages, configuration, etc. It is also sometimes required to change attributes of the container itself because of external reasons, such as security vulnerabilities that require patches to be installed.
  
  There are several ways to change an existing server:
  
  1. Manually create the server initially, then keep changing its content (mutating) each time a change is required.
  2. "Bake" an image for a server based on a recipe, usually in an automated way (not manually). Then create servers from that image. And repeat this process on every change.
  
  The former is called Snowflake, while the latter is a practice that allows Phoenix and Immutable server types. Where Immutable states that no changes are made to an existing server once it was created, and Phoenix means that a server is destroyed completely and a new one is used to replace it during the change process.
  
  > **Comments:**
  > **username_3**: If you create an image in fact it would be immutable, not phoenix, phoenix will run configurations against nodes, looking for configuration states.  
  > **username_2**: It depends on which way you chose to use, way #1 or way #2. In both you create an image, but after it is created the usage of that image is different.  
  > **username_3**: But ansible for example would be used as a phoenix server and it doesn´t create an image, we don´t consider it a manually change, right?  
  
  ---
  
  ### Answer by username_0 on 2017-03-14. Score: 10
  
  As I was more thinking of a listing of advantages and drawbacks of each type, here's is my view (not exhaustive, it's the important operational ones in my opinion):
  
  1. **Snowflakes Servers**
  
     * **What they are**: Systems with their specific configuration, no other servers in the data centre have the exact same parameters. They are usually manually administered.
     * **Advantages**:
  
       + Fitted to the needs of what's running on them.
       + Long-lived, updates are usually shorts.
       + Adapted to special cases where the tweaks are well documented by the product hosted.
     * **Drawbacks**:
  
       + Sometimes updates leave unused files, the cleanup could be complex.
       + When the changes have to be made to multiples machines it takes a while.
       + Nothing prevents undocumented change.
       + In the case of corruption, you have to rebuild a base OS and restore, some OS tweaks can't be restored and should be reapplied, it's easy to slip over a line and forget an important tweak.
       + Usually long to provision due to the manual configuration.
  2. **Phoenix Servers**
  
     * **What they are**: Automatically configured by some code.
     * **Advantages**:
  
       + Defined by code, version-able.
       + Easily replicated to a point in time.
       + Long-lived, short updates also.
       + Changes to controlled files are documented and can't be forgotten.
     * **Drawbacks**:
     * Sometimes updates leave unused files, the cleanup could be complex.
     * Not everything is under code management, some tweaks by a human can be missed if not included into the automation.
  3. **Immutable Servers**
  
     * **What they are**:
       + Automated one-time provisioning from a master image with generally no access.
     * **Advantages**:
  
       + Defined by code, version-able.
       + Easily replicated to a point in time.
       + Reduced attack surface due to the usual removal of remote access.
       + Fixed configuration, no change can break something
       + Easily scalable 'on demand' from the master image.
     * **Drawbacks**:
  
       + They are immutable, you have to ensure you can roll an update quickly in case of a 0day flaw impacting you.
       + Not all applications fit well inside this model (Databases, for example, a complete replace on same data is not always possible, there's migration to handle).
       + Brings some new challenges for forensic analysis of crash and log management.
  
  None of those patterns is exclusive, you have to chose the best one according to your actual need. Snowflakes bring a lot of concerns in case of recovery after a disaster so the choice is usually more between Phoenix and Immutable.
  
  
  ---
  
  ### Answer by username_1 on 2017-04-28. Score: 2
  
  All three are patterns of sorts, it isn't is a case of picking and choosing which to use in any specific circumstance but a case of knowing when to recognise the patterns that can help or hurt you.
  
  # Snowflake Server
  
  A [Snowflake Server](https://martinfowler.com/bliki/SnowflakeServer.html) is very much an anti-pattern representing the case when a server evolves in an uncontrolled manner to the point when it cannot be easily reproduced.
  
  I have had numerous run-ins with this kind of server in production, they are fairly easy to spot as there is usually a large number of failed changes and comments such as "it [the change] worked in Development/Test/UAT/Staging".
  
  # Phoenix Servier
  
  A [Phoenix Server](https://martinfowler.com/bliki/PhoenixServer.html) is more of a principal than a pattern as Martin Fowler puts it:
  
  > A server should be like a phoenix, regularly rising from the ashes.[a]
  
  If you were to apply IT Service Management (ITSM) or ITIL language to the same situation you would likely call it an [IT Service Continuity Plan](https://www.enisa.europa.eu/topics/threat-risk-management/risk-management/current-risk/bcm-resilience/bc-plan/it-service-continuity-plan) or Recovery Plan:
  
  > A separate plan for each service should provide detailed procedures and step-by-step guidelines for each stage of an incident so that the Recovery Teams are able to restore the services and thereby to meet the agreed process and component RTOs.
  
  # Immutable Server
  
  An [Immutable Server](https://martinfowler.com/bliki/ImmutableServer.html) or [Immutable Infrastructure](https://www.oreilly.com/ideas/an-introduction-to-immutable-infrastructure) is the process by which we treat all deployed infrastructure, configuration and code as utterly immutable, i.e. unchanging. When we deploy anything new we spin up new infrastructure and deploy the code to this. Interestingly this mostly satisfies the needs traditionally fulfilled by [Evergreening](https://blog.juriba.com/evergreen-it-concept-or-reality).
  
  ---
  
  ## Notes
  
  * **a:** Martin's colleague [Kornelis Sietsma](https://twitter.com/kornys) came up with the term "Phoenix Server" on an internal discussion list.
  
  
  ---
  
  