I’m a software architect, and also a sci-fi fan. Something tells me I’m not the only one who possesses those two qualities.
As such, many times when I watch some of the latest sci-fi TV series or movies, in which the evil aliens pay us a visit and want to kill us all, and ultimately fail because some brave fighter / hero / pilot succeeds in destroying the mothership or the mother queen or the mother-*, which brings the whole fleet down, I find myself banging my head against the wall and shouting “You a**holes! THIS IS NOT HOW YOU DESTROY A PLANET!”
You see, it doesn’t matter how ugly are your spaceships, how giant are your fighters, and how lethal are your lasers. if your IT architecture is flawed – you will finally be beaten by mere earthlings.
So, for future alien reference, here is a quick guide which will help you annihilate us all next time you’re in the neighborhood.
I’ll use the latest “Independence Day Resurgence” movie as a sample. For the sake of the discussion, it really does not matter what’s my opinion on this movie (<cough>bad, sooooo bad</cough>) but I would like to focus on the architectural aspects of the alien forces.
First, meet The Queen:
(source: scified.com)
This is a nasty creature, which you wouldn’t want to meet in a dark alley at night. Thinking of it, you wouldn’t want to meet her in the middle of a well lit highway, too.
Since evil queens never have names in movies, I took the liberty of naming her, and from now on I’ll refer to her as “The Server”.
So, in the movie, The Server is linked to all the fighter ships, and controls them. The ships are fully dependent on The Server, and cannot function without it.
(This may sound like a bad architectural choice, but actually most of the apps today in the Human world also work the same, and cannot function without a working server.)
The Humans are getting aware of this fact, and decide to do the obvious – destroy The Server, and bring the whole fleet down.
Now, The Server is not an idiot. You’ve got to be at least partially smart to be able to cross half the universe in one piece. So The Server surrounds itself with many kinds of protections, which, as before, aren’t explicitly named and therefore will be named from now on “Firewall”.
So this is what happens next:
The attackers (Humans, remember?) are bombing the Firewall, to no avail. The Server meanwhile is humming along and minding his own business (which is, unfortunately, destroying Earth). The turning point happens when an especially smart attacker finds a weak spot in the Firewall, shoots straight at The Server and destroys it.
And this is where the problem begins.
In a well planned architecture, this is what should happen (for clarity, I’ll show The Server as a rectangular box with some buttons, and not as the fierce monster it really is):
The first thing to note is that the fighter ships do not actually talk to The Server. They talk to a Load Balancer. The purpose of this Load Balancer is to handle this exact situation – when The Server is not available. (Actually, the Load Balancer also balances the load – see what I did here? – but that’s not in the scope of this guide.)
In addition, note that there are two Servers in this diagram, and they both make our architecture redundant. Meaning: if one Server fails – there is another one to back it (her?) up. There are many modes those two Servers can co-exist, but for the sake of this scenario let’s assume that Server 2 is also active, and can control the fighter ships.
Now, when the mother queen…errr… The Server 1 is destroyed, the Load Balancer detects it and knows that from now on the ships should talk only to Server 2, which is located somewhere remote. No change should be applied to the ships’ software – they continue to talk to the Load Balancer, as before. They have no idea The Server 1 is not with us anymore.
Making our architecture redundant ensures that in the case of a server failure, for any reason, our operation will still function properly, and we won’t lose customers, money or fighter ships.
And the aliens always fail to figure that out, and base all their IT architecture on a F***ING SINGLE, FRAGILE SERVER!! I mean, com’on! It’s even dumber than those idiotic aliens who invaded Earth just to find out 70% of its surface are water, which kill them instantly!
So next time you want to destroy a planet, or just build a reliable system, make sure to bring with you a working Load Balancer and at least two Servers (three is better).
You can thank me later.
PS – Of course, this architecture is far from complete. How can we make the Load Balancer redundant? Where should the 2nd server be located? Do we need a DR? And what about the SLA? All those are great question, but let’s do it with baby steps…