Tip:
Highlight text to annotate it
X
Hello, my name is Maciej Zawadzki and we're going to be talking about deployment of changes
versus the deployment of snapshots. Most people are very familiar with the deployment of changes,
it is exactly how they think about deployment to servers. Ok, so, for example if we want
to get the red file out there onto our server we have a change that includes the red file
and we push that out there. If we then want to add a orange file, we have a change that
encapsulates that orange file and we push that out there, right? That's how we think,
normally think about deployment of a configuration to a server. Another approach is a snapshot
based approach. Now, what is a snapshot? A snapshot basically is a, the configuration
of our target system at a point in time, ok? So here we have our system with a red file
and an orange file, that corresponds to a snapshot. That corresponds specifically to
our Version 2 snapshot. If we then change this configuration of our target system, that's
going to correspond to a new snapshot with that changed configuration, ok. So, notice
that we can go between snapshot based approach and change based approach, we can calculate,
given one, we can calculate the other. It's easy to see that the changes are really just
the differences between two successive snapshots, right, in this particular case, the difference
is this green file, which corresponds to this change. Here it's the orange file, etc.. So
given snapshots, we can calculate changes. Also given changes, we can calculate snapshots,
all we have to do is start with the first change and kind of apply successively the
following changes, and that's how we get to further and further snapshots, ok. In practice,
that's a little bit harder than it sounds because instead of having three changes, we
might have three thousand changes that were applied to a particular server. So from that
perspective, we can see one of the big differences between a snapshot based approach and a change
based approach, right, just the amount of information that we have to keep track of,
right. Rather than keeping track of three thousand changes that we would have to apply,
we can keep track of one snapshot and that snapshot encompasses, essentially, the configuration
or the state captured by those three thousand changes. Now, this also has a further practical
relevance, because if we want to stand up a new server, let's say the load for our application
suddenly spiked, we need a new server, well the server's going to be starting with a blank
state, so we now need to build up that state to the point where it can actually start handling
a load. So, with a change based approach, we'd have to, again, start at the very first
change and start applying all these changes successively to build up the state of, the
configuration of that server to get it to the desired point. With a snapshot based approach
all we need to do is select the snapshot that encompasses that target state for us and then
just deploy that snapshot to the server. So from that perspective, the snapshot based
approach is far simpler and, in fact, the snapshot based approach kind of delivers on
a lot of the goals of the infrastructure as code approach to handling server configurations.
In this video, we really focused on applying snapshots to server based configurations,
the topic for us for next time is going to be how we can apply snapshots to configurations
of entire environments. Thank you.