The post has been translated automatically. Original language: Russian
When a new internal service appears, many people follow the simplest path.
There is a server on which the processor, memory and disk are free. This means that you can install another application there.
At first it really seems convenient.
The website is running on the same server.
There is a database nearby.
There's also a monitoring system.
Later, the corporate Wiki appears.
Then a VPN.
After a while, the file storage is added.
While there are few users, everything is functioning without noticeable problems.
But a year passes, and the question arises: what exactly can be rebooted, updated, or migrated so as not to break anything?
It turns out that it is no longer easy to answer.
All services start to depend on each other.
If you need to update the operating system, you have to consider several applications at once.
If one service suddenly starts actively using the processor or memory, this affects the work of the others.
And if you need to transfer only one of them to another server, you won't be able to do it quickly.
That is why virtualization has changed the way we build infrastructure.
Today, a separate virtual machine is not a luxury or a sign of redundancy.
This is a way to make the system more understandable.
Each service gets its own environment.
It can be updated independently of the others.
Restarting one application does not affect the neighboring ones.
It's easier to look for the causes of errors.
It's easier to migrate services.
It's easier to plan development.
Of course, it doesn't always make sense to create a separate VM for each small task either.
It is important to maintain a balance.
But if a service performs an independent function, has its own lifecycle, or requires separate maintenance, isolation usually pays off.
There is an interesting observation.
When the infrastructure is just developing, everyone is thinking about computing resources.
Is there enough memory?
Is there enough CPU?
How much disk space should I choose?
After a few years, the questions become completely different.
How easy is it to update this service?
Is it possible to transfer it without stopping the rest?
Is it clear to the new employee exactly where he works?
It is then that it becomes noticeable that a well-divided infrastructure saves not so much processor time as people's time.
Cloud technologies are valued not only for the ability to quickly create a virtual machine.
The main advantage comes later, when the infrastructure grows. The more independent and understandable components it has, the easier it is to maintain order and the less likely it is that a change in one place will unexpectedly affect the operation of a completely different service.
Когда обсуждают облачную инфраструктуру, обычно говорят о скорости запуска виртуальных машин, масштабировании или экономии на оборудовании.
Но есть преимущество, которое вспоминают гораздо реже.
Облако делает эксперименты значительно дешевле.
Представьте обычную ситуацию.
Компания хочет внедрить новую систему управления проектами. Никто не знает, подойдет ли она команде. Чтобы это проверить, нужно развернуть сервер, установить приложение, дать сотрудникам доступ и посмотреть, как оно покажет себя в работе.
Если инфраструктура построена на физических серверах, к такому эксперименту начинают относиться осторожно. Нужно выделить оборудование, подготовить место, продумать, что делать с ним после завершения тестирования.
Поэтому многие идеи так и остаются идеями.
В облачной среде подход меняется.
Создать виртуальную машину можно за несколько минут.
Проверить новую систему.
Дать доступ нескольким сотрудникам.
Если эксперимент оказался удачным, сервис продолжает работать.
Если нет — виртуальную машину можно удалить, не оставляя после себя неиспользуемое оборудование.
То же самое касается обновлений.
Предстоит переход на новую версию CMS или базы данных? Необязательно проводить первый запуск сразу на рабочем проекте. Можно собрать отдельную среду, повторить конфигурацию, проверить совместимость и только потом переносить изменения в эксплуатацию.
Иногда такой тест выявляет проблемы, которые в обычных условиях обнаружились бы только после обновления рабочего сайта.
Есть еще один пример.
Разработчику нужно воспроизвести ошибку, которая возникает только при определенной конфигурации системы.
Вместо того чтобы менять параметры существующего сервера и рисковать стабильностью остальных сервисов, можно развернуть отдельную виртуальную машину именно с нужными настройками.
После завершения работы она больше не понадобится.
И это нормально.
Не каждая созданная виртуальная машина обязана существовать годами.
Иногда ее задача — помочь принять решение.
Пожалуй, именно это и является одним из самых практичных преимуществ облачной инфраструктуры.
Она снижает стоимость ошибки.
Когда эксперимент легко начать и так же легко завершить, команды чаще пробуют новые решения, проверяют гипотезы и тестируют обновления заранее.
В результате меняется не только инфраструктура.
Меняется сам подход к работе.
Вместо вопроса «А вдруг не получится?» появляется другой: «Почему бы не проверить?» Именно такая возможность спокойно экспериментировать часто приносит больше пользы, чем дополнительные процессоры или гигабайты памяти.