My work as a cloud architect brings me to many customers, from various fields.
These customers usually need one of two kinds of help:
- “My system runs on-prem, and I want to move it to the cloud. What is the best architecture for that?”
- “I have a system that currently runs on the cloud. I want to make sure the cloud architecture is optimized, cost-wise and redundancy-wise”
While the first one is exciting and awesome to work at (it’s always fun to migrate an on-prem system to the cloud), I would like to focus on the second one.
Here is an excerpt from one of the introductory mails I’ve got from a customer. This is the part that deals with the current cloud architecture (with some minor changes):
Thanks for the great talk!
As per your request, here is the list of the cloud components of our cloud architecture:
– Java app, runs on 2 VMs, with another VM for load balancer
– MySQL DB, runs on a VM and replicated to another VM
– Windows Service for batch jobs, runs on 1 VM”
All in all – that’s 8 VMs.
The No-VM Phobia
Now, this list is quite similar to many other lists I get from other clients. And don’t be wrong – we’re not talking here about legacy institutions, with deep roots in the VMWare era. Nope, we’re dealing with young, dynamic, agile, 3-persons startups.
And yet – they almost always go to the VM route.
It looks like they actually afraid to explore other options that don’t involve virtual machines, and stick to this solution as if their life depends on it.
And that’s really strange.
Because, you see, while VMs are the basic building blocks of any public cloud, they are so much inferior to managed services.
Managed Services Are The Way To Go
If you’re not familiar with cloud managed services – here is a quick intro.
Managed services provide services that are, well, managed by the cloud provider. And by “managed” I (and they) mean that the cloud provider manages all the infrastructure supporting the service, and frees you, the developer, to deal with what you really want to do – develop.
For example, one of the most widely used managed service is PaaS – Platform as a Service. PaaS allows the developer to simply upload the code to be run to the cloud, and the cloud provider will make sure the code will be executed on a stable, up-to-date, protected virtual machine.
The developer will never have to worry about software updates, downtimes, anti virus, blue screens and so on. In fact, the developer can’t, even if she really wants to, log in to the VM (using RDP or SSH) and perform actions.
This diagram (which can be found in many versions across the internet) depicts this idea quite nicely.
What you see here are the parts you, the developer, should take responsibility of when working with VMs (also called IaaS – Infrastructure as a Service) vs with PaaS:
Notice how, with IaaS, you need to take care of the OS, runtime, and, of course, the application, whereas with PaaS you only care about the application (and your data, of course).
But that’s not all. Besides making you worry less about infrastructure, managed services usually offer features not found in traditional IaaS:
- Auto Scaling (with some notable exceptions such as VM Scale Set)
- Deployment Slots
- Cost optimization (mainly when paying by consumption)
- Updated, patched runtime
- Full integration with Source Control
- and lots more…
So, back to the original question – why do startups prefer using VMs vs Managed Services?
Reasons For Using VMs
Well, there appears to be some reasons for this decision. Some are sound, some – not so much.
Here are the main ones:
Comfort Zone – The founders are comfortable with VMs. They did it many years before, it works, they don’t see any reason to change it.
My Verdict: Wrong. This is not a good reason for using VMs. If comfort zone is the prime factor for you, don’t build a start-up. VMs will require more time, more employees, more attention, and provide less value.
Vendor Lock-In – When using VMs, it’s quite easy to migrate to other clouds. All that’s needed is to lift-and-shift the VM’s image, and voila! we have a running VM on the other cloud.
My Verdict: You have a point, but… If you made a strategic decision to go to the cloud – embrace it! Maximize it! Squeeze it! Take advantage of whatever you can, because it will give you the highest value in the long run.
Full Control – There are cases when a full control on the machine is required, and PaaS, which simply cannot provide such control, is not a good fit. For example, a software that has to access the Registry of the Windows Server will not run well on PaaS, since it won’t have access to the registry.
My Verdict: OK, you win. Although I would have recommended to conduct a thorough architecture review to make sure this registry thingy is a real necessity, and not just an “it’s easy so I did it” thing.
Don’t be afraid to embrace managed services. The added value of such services is tremendous, and I’m sure it will be well worth the time you invest in learning and using it.
Did you have a change to take a look at my latest on-line course The Complete Guide to Becoming a Software Architect? Learn more here.