Six of Verdalia's ADRs end with the same sentence: “to be reviewed when the store moves to a cloud platform.” Queues, scaling, availability, credentials, the network, and backups were solved with what was available: servers rented by the month, in a single data center, administered by hand by one person. In this lesson you will learn what exactly the cloud is, which service models it offers, and how responsibilities are split between provider and customer in each one. You will get to know the major providers, the criteria for choosing, the way you pay, and the strategies for migrating. And we will return to serverless architecture, which we left pending in Module 1. Verdalia will decide whether to move, where to, and in what order, and will record it in ADR-010.
Two warnings. The prices in this lesson are fictitious, as is the provider Verdalia chooses: real price lists change frequently and must be checked at the source. And taking personal data to a cloud provider has legal implications: the location of the data, the data processing agreement, and international transfers must be reviewed with legal and compliance advice (GDPR).
What Cloud Computing Is
Renting a server in someone else's data center, as Verdalia does, is not using the cloud. The most cited definition, from the US institute NIST, requires five characteristics:
| Characteristic | Meaning | Verdalia's rented servers |
|---|---|---|
| On-demand self-service | The customer creates and destroys resources on their own, without the provider's intervention | Halfway: they are requested in a console and arrive in hours |
| Broad network access | Everything is managed over the internet, with a programming interface | There is a console, but not a complete interface |
| Resource pooling | The provider shares a large infrastructure among many customers, isolated from each other | Yes |
| Rapid elasticity | Capacity grows and shrinks in minutes, and can do so on its own | No: verdalia-app-04 took 2 hours and 15 minutes |
| Measured service | What is used is measured, and paid for | No: monthly fee, whether used or not |
The two that are missing, elasticity and pay per use, are the ones scenario QS-2 asks for.
Service Models and Shared Responsibility
Cloud services are classified according to how much the provider manages:
| Model | The provider offers | The customer brings | Examples |
|---|---|---|---|
| IaaS, infrastructure as a service | Virtual machines, networks, and disks | The operating system and everything on top of it | Amazon EC2, Azure Virtual Machines, Compute Engine |
| CaaS, containers as a service | A platform that runs containers | The container image | Amazon ECS, Azure Container Apps, Cloud Run |
| PaaS, platform as a service | The complete runtime environment | The code | AWS Elastic Beanstalk, Azure App Service, App Engine |
| FaaS, functions as a service | The execution of individual functions, when they are invoked | The code of each function | AWS Lambda, Azure Functions, Cloud Run functions |
| SaaS, software as a service | A finished application | The data and the configuration | Verdalia's email provider; PagoRaíz |
Managed databases, queues, and stores sit at the PaaS level: the customer uses the service without seeing the machine.
The Shared Responsibility Model
In the cloud, security and operation are shared. The provider is responsible for the cloud. The customer is responsible for what they put in it.
| Layer | Own servers | IaaS | CaaS | PaaS and FaaS | SaaS |
|---|---|---|---|---|---|
| Data, identities, and permissions | Customer | Customer | Customer | Customer | Customer |
| Service and network configuration | Customer | Customer | Customer | Customer | Customer, in part |
| Application code | Customer | Customer | Customer | Customer | Provider |
| Runtime and libraries | Customer | Customer | Customer, inside the image | Provider | Provider |
| Operating system | Customer | Customer | Provider | Provider | Provider |
| Virtualization, servers, and physical network | Customer | Provider | Provider | Provider | Provider |
| Building, power, and cooling | Customer | Provider | Provider | Provider | Provider |
The first row never changes. An object store open to the whole internet because of a misconfigured permission is the customer's responsibility, however managed the service is. Most data leaks in the cloud have that origin, and not a failure of the provider.
Serverless, the Promise From Module 1
In Module 1 we introduced serverless architecture and promised to come back to it. Now we have what we need.
Serverless designates services in which the customer reserves no capacity: the provider assigns it when work arrives and withdraws it when the work ends, down to zero. You pay for actual use. Its best-known form is FaaS, but there are also databases, queues, and containers with the same model.
A function runs like this: an event arrives, which can be an HTTP request, an uploaded file, or a message in a queue; the platform looks for an already prepared copy of the function and, if there is none, creates one; the function runs, returns its result, and waits. If no more events arrive, the platform removes it.
| Aspect | What it implies |
|---|---|
| Cold start | Creating a new copy takes from tenths of a second to several seconds, depending on the language and the size. That request is slow. It affects the high percentiles, which are what the scenarios measure |
| No local state | Nothing the function keeps in memory or on disk survives. State goes to external services |
| Limits | Maximum duration per execution, memory, and code size |
| Connections | Hundreds of simultaneous copies can exhaust the connections of a relational database |
| Cost | You pay per invocation and per execution time multiplied by the assigned memory. Without traffic, the cost is zero |
| Lock-in | Events, permissions, and deployment are specific to each provider |
| Fits | Does not fit |
|---|---|
| Sporadic tasks: resizing an image when it is uploaded | High, constant load: it costs more than fixed capacity |
| Very irregular or unpredictable load | Strict latency on every request |
| Scheduled jobs: a nightly report | Long-running processes |
| Glue between managed services | Existing applications built as a single block |
With NubeAtlas's fictitious price list, €0.20 per million invocations and €0.000017 per gigabyte-second, resizing the 600 images Verdalia uploads each month would cost 3 cents. Serving the whole store this way, with 1.8 million monthly requests, would cost about €8. Compute is cheap because Verdalia's traffic is modest. What is expensive is something else: rewriting 55,000 lines organized as a modular monolith into dozens of functions. We will come back to it in the matrix.
Deployment Models
| Model | What it consists of | Advantage | Drawback |
|---|---|---|---|
| Public cloud | A provider's infrastructure, shared among customers | Elasticity, catalog, and no upfront investment | Dependence on the provider |
| Private cloud | Infrastructure with the characteristics of the cloud, for a single organization | Total control | It has to be bought and operated |
| Hybrid cloud | Part in the public cloud and part on premises, connected | Lets you keep what cannot be moved | Two worlds to operate and secure |
| Multi-cloud | Several public cloud providers at once | Less dependence on any single one | The required knowledge multiplies. It usually ends up using only what is common to all |
For a small team, deliberate multi-cloud rarely pays off. Using one specific service from another provider for one specific reason, as Verdalia's backups will, is a different matter.
Regions and Availability Zones
We introduced both concepts in Module 4. A region is a geographic area. An availability zone is one or more data centers within a region, with independent power and network, and connected to each other with very low latency.
| Decision | Protects against | Cost |
|---|---|---|
| One zone | Nothing beyond the failure of one machine | The lowest |
| Several zones in one region | The failure of a data center | Duplicated capacity for whatever has state, and traffic between zones |
| Several regions | A regional disaster or a general failure of the provider in the region | High: data replication with latency, and consistency between sites |
The region also decides where the data resides, which has legal consequences, and the latency to customers. Not every service is in every region, and prices vary between them.
Managed vs. Self-Managed Services
Almost everything can be done in two ways: install PostgreSQL on a virtual machine, or contract a managed database.
| Self-managed | Managed | |
|---|---|---|
| Installation, patches, and versions | The team | The provider, in windows the customer chooses |
| Backups and point-in-time recovery | They have to be built and tested | Included. Testing them is still the customer's job |
| High availability | It has to be set up, and split-brain understood | An option you tick |
| Control | Total: any version, extension, or parameter | Limited to what the service allows |
| List price | Lower | Higher: often 30% to 100% more |
| Real cost | The price, plus the team's hours and the risk | The price |
| Lock-in | Low | Depends on how standard the interface is |
The trade-off is cost and control in exchange for operational load. For a team of three, operational load is the scarcest resource. A practical rule: self-manage only what differentiates the business. Nobody buys from Verdalia because of how well it administers PostgreSQL.
Provider Landscape
| Provider | Traits it is usually chosen for |
|---|---|
| Amazon Web Services, or AWS | The first to arrive and the one with the broadest catalog. Large community and abundant documentation. The catalog itself and its pricing are complex |
| Microsoft Azure | Integration with the Microsoft ecosystem: Windows Server, corporate directory, and .NET. Strong in large enterprises and in hybrid scenarios |
| Google Cloud | Data analytics and machine learning. Origin of Kubernetes. Its own worldwide network |
| European and regional providers, such as OVHcloud, Scaleway, IONOS, or Hetzner | Simpler prices, European jurisdiction, and close relationships. Fewer managed services and fewer regions |
The big three have a region in Spain and offer equivalents of almost everything. Among them, the differences that decide are usually the team's prior knowledge and the company's commercial relationships, more than the technology.
Equivalents by Category
The table includes the generic names we will use for NubeAtlas, the fictitious provider of this course:
| Category, and name in NubeAtlas | AWS | Azure | Google Cloud |
|---|---|---|---|
| Virtual machines | Amazon EC2 | Azure Virtual Machines | Compute Engine |
| Managed database | Amazon RDS | Azure Database for PostgreSQL | Cloud SQL |
| Object storage | Amazon S3 | Azure Blob Storage | Cloud Storage |
| Managed load balancer | Elastic Load Balancing | Azure Application Gateway | Cloud Load Balancing |
| Managed container service | Amazon ECS with Fargate | Azure Container Apps | Cloud Run |
| Managed Kubernetes service | Amazon EKS | Azure Kubernetes Service | Google Kubernetes Engine |
| Functions | AWS Lambda | Azure Functions | Cloud Run functions |
| Secrets manager | AWS Secrets Manager | Azure Key Vault | Secret Manager |
| Managed queue service | Amazon SQS and Amazon MQ | Azure Service Bus | Pub/Sub |
| Managed cache | Amazon ElastiCache | Azure Managed Redis | Memorystore |
| Image registry | Amazon ECR | Azure Container Registry | Artifact Registry |
| Observability | Amazon CloudWatch | Azure Monitor | Google Cloud Observability |
Equivalent does not mean identical. Two queue services can differ in the protocol, in the delivery guarantees, and in message ordering.
Selection Criteria
| Criterion | Question | Importance for Verdalia |
|---|---|---|
| Required services | Does it offer, managed, everything that is administered by hand today? | High |
| Regions and data residency | Is there a region in the European Union, with several zones? Where are the backups stored? | High: 38,000 customer accounts |
| Cost and predictability | Can the bill be estimated before receiving it? | High: €500 limit |
| Team experience | Has anyone used it? | Medium: nobody has experience with any of them |
| Vendor lock-in | How much would it cost to leave? | Medium |
| Support | Who answers, in which language, and how quickly? | Medium |
| Compliance | Which certifications does it hold? Does it sign the data processing agreement? | High |
Vendor lock-in is not eliminated: it is graded. A managed PostgreSQL database is left behind with a dump. An application written on top of a provider's exclusive services is left behind by rewriting it. The practical question is how much it would cost to leave, and whether that cost is acceptable.
How the Cloud Is Paid For
| Mode | How it works | When it suits |
|---|---|---|
| Pay per use | You pay per hour, or per second, for what is running | Variable load, test environments, and beginnings |
| Reservation or commitment | You commit to a usage for one or three years, in exchange for a significant discount | Stable, known load: the database |
| Spot capacity | Heavily discounted machines, which the provider can withdraw with minutes of notice | Jobs that can be repeated |
| Free tier | A monthly amount at no cost | Testing |
Three costs surprise on the first bill:
- Outbound data transfer. Putting data into the cloud is usually free. Taking it out to the internet is charged per gigabyte, and so is traffic between zones and regions.
- What is left switched on. A test environment nobody remembers costs the same as one in use.
- Storage that grows. Logs, backups, and object versions accumulate.
Two minimum measures from day one: tag every resource with its environment and its owner, and configure a budget alert. The complete discipline, called FinOps, is covered in Module 8.
Migration Strategies: The 6 Rs
| Strategy | What it consists of | In Verdalia |
|---|---|---|
| Rehost | Move as is, with no changes | The product images |
| Replatform | Move with adjustments, to take advantage of managed services, without touching the architecture | PostgreSQL, Redis, and RabbitMQ become managed services. The store keeps its code |
| Refactor | Redesign for the cloud | Nothing |
| Repurchase | Replace with a SaaS product | Nothing: email and payments already are |
| Retire | Switch off what is no longer needed | The team's own load balancers, the bastion host, and the setup checklist |
| Retain | Leave where it is | The CDN, the backups at the second provider, and PagoRaíz |
Several coexist in the same system. Rehosting is the fastest and the one that takes the least advantage of the cloud. Refactoring is the opposite.
Verdalia: Options and Decision Matrix
The meeting was on Monday, May 17, with the diagrams from the previous lesson on the table.
| Option | What it consists of |
|---|---|
| A. Stay on the rented servers | The nine machines, and automate whatever can be automated |
| B. NubeAtlas, with virtual machines only | The same pieces, installed by the team on virtual machines in two zones |
| C. NubeAtlas, with managed services | Managed data, load balancing, secrets, and queues. The store, with no code changes, with variable capacity |
| D. NubeAtlas, rewriting the store as functions | Serverless |
With the method and the weights from Module 1:
| Criterion | Weight | A | B | C | D | Main reason |
|---|---|---|---|---|---|---|
| Availability | 25 | 2 | 3 | 5 | 4 | Only C and D give automatic failover without building it |
| Maintainability | 20 | 3 | 3 | 3 | 2 | D undoes the modular monolith of ADR-001 |
| Security | 15 | 3 | 3 | 4 | 4 | Secrets manager, disk encryption, and provider patches |
| Performance | 15 | 3 | 3 | 3 | 2 | Cold start in D |
| Scalability | 10 | 2 | 3 | 4 | 5 | |
| Cost | 10 | 4 | 3 | 3 | 2 | D requires 8 to 10 months of rewriting |
| Operability | 5 | 2 | 2 | 4 | 3 | B moves the nine machines, with their 38-step checklist |
The weighted_score and rank functions from the lesson “Architectural Decisions and Trade-offs” give this result:
3.80 C. NubeAtlas, with managed services 3.15 D. NubeAtlas, rewriting the store as functions 2.95 B. NubeAtlas, with virtual machines only 2.70 A. Stay on the rented servers
Marta repeated the calculation with cost at 25 and availability at 10, to check whether the decision depended on the weights. Option C stayed first, with 3.50, and A rose to second place, with 3.00. The constraints also rule out D: it does not fit before the March 2028 campaign.
Why NubeAtlas
Marta compared four providers: the big three and NubeAtlas, a fictitious European provider. All four met the technical requirements. Three things decided it: the price list in euros and without tiers, Spanish-language support included in the price, and the fact that all of its managed services speak open protocols. The database is PostgreSQL, the cache is Redis-compatible, the queues use RabbitMQ's AMQP protocol, and the object storage uses the interface the store already uses today. No adapter changes. Its eu-sur-1 region, in Madrid, has three zones: eu-sur-1a, eu-sur-1b, and eu-sur-1c.
| NubeAtlas service | Size | Fictitious price |
|---|---|---|
| Compute unit | 4 cores and 8 GB | €0.11 per hour |
| Managed database, PostgreSQL, in two zones | 4 cores and 8 GB | €150 a month |
| Read replica | 2 cores and 4 GB | €40 a month |
| Managed cache, in two zones | 2 GB | €40 a month |
| Managed queue service | €18 a month | |
| Managed load balancer | €20 a month | |
| Managed VPN | €12 a month | |
| Secrets manager | Up to 10 secrets | €4 a month |
| Object storage | 60 GB | €6 a month |
| Outbound transfer | The first 100 GB, free | €5 a month, estimated |
Adding the compute for the notification-service, €31; a staging environment that is switched on on demand, €14; the CDN, €12; and the external backups, €8, the estimated fixed cost is €360 a month.
Cost Comparison in Python
A compute unit costs €80 a month at NubeAtlas, and an equivalent server, €60 at the current provider. The cloud is more expensive per unit. The question is how many units are needed, and for how long.
HOURS_PER_MONTH = 730
MONTHS = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]
CAMPAIGN = {"mar", "apr", "may"}
# Rented servers: monthly fee, whether used or not
RENTAL_FIXED = 297 # load balancers, database, auxiliary, bastion, backups...
APP_SERVER = 60 # size M: 4 cores and 8 GB
# NubeAtlas: managed services at a fixed price and compute by the hour
CLOUD_FIXED = 360
UNIT_HOUR = 0.11 # one compute unit: 4 cores and 8 GB for one hour
# Compute units the store needs on average over the month
AVERAGE_UNITS = {month: (2.2 if month in CAMPAIGN else 1.1) for month in MONTHS}
def rent_for_peak(month):
"""Four servers all year: the capacity of the day before Mother's Day."""
return RENTAL_FIXED + 4 * APP_SERVER
def rent_adjusted_by_hand(month):
"""Like today: three servers during the campaign and two the rest of the year."""
servers = 3 if month in CAMPAIGN else 2
return RENTAL_FIXED + servers * APP_SERVER
def cloud_with_variable_capacity(month):
"""Each hour you pay for the capacity used that hour."""
return CLOUD_FIXED + AVERAGE_UNITS[month] * HOURS_PER_MONTH * UNIT_HOUR
SCENARIOS = {
"Rental, for the peak": rent_for_peak,
"Rental, adjusted by hand": rent_adjusted_by_hand,
"NubeAtlas, variable": cloud_with_variable_capacity,
}
print(f"{'Scenario':28}{'Campaign':>10}{'Rest':>10}{'Year':>10}{'Average':>10}")
for name, cost in SCENARIOS.items():
yearly = sum(cost(month) for month in MONTHS)
print(f"{name:28}{cost('apr'):>10.0f}{cost('oct'):>10.0f}{yearly:>10.0f}{yearly / 12:>10.0f}")
# What if the load were constant? The cloud stops paying off
constant = CLOUD_FIXED + 3 * HOURS_PER_MONTH * UNIT_HOUR
print(f"\nNubeAtlas with 3 units all year: €{constant:.0f} a month")
print(f"With a one-year reservation, 30% less on compute: €{CLOUD_FIXED + 3 * HOURS_PER_MONTH * UNIT_HOUR * 0.7:.0f}")Output:
Scenario Campaign Rest Year Average Rental, for the peak 537 537 6444 537 Rental, adjusted by hand 477 417 5184 432 NubeAtlas, variable 537 448 5645 470 NubeAtlas with 3 units all year: €601 a month With a one-year reservation, 30% less on compute: €529
Explanation:
RENTAL_FIXEDis the campaign's €477 minus the €180 of the three application servers.HOURS_PER_MONTHis the average number of hours in a month.AVERAGE_UNITSis a dictionary built with a comprehension: 2.2 units on average in the three campaign months and 1.1 in the rest. It is the key to the calculation. Off season, 40 users fit in two small copies of the store, one per zone, which add up to one unit. During the campaign, a Saturday peak requires four units for a few hours, but the monthly average is much lower.- Each scenario is a function that receives the month and returns the cost. The
SCENARIOSdictionary lets you go through them with the same loop. - The last two lines calculate a different case: a constant load of three units.
Interpretation:
- The cloud is not cheaper. It costs €470 on average, €38 more than today. What you buy with them is automatic failover, two zones, and capacity that adjusts on its own.
- The fair comparison is with the first row. Today the adjustment is made by hand and days in advance. If an email campaign on any given Tuesday succeeds, there is no fourth server. Always having the peak capacity would cost €537.
- With constant load, pay per use loses. Three units all year would cost €601. Reservations are for what is stable.
- It is an estimate. The averages of 1.1 and 2.2 are Lucía's hypotheses. The real bill will be known after the first month, and that is why there will be a budget alert.
ADR-010 and Migration Plan
ADR-010: Migrate the store to the NubeAtlas cloud platform in phases, with managed services for data, load balancing, and secrets
Status: Accepted
Date: 2027-05-19
Participants: Marta decides; Íker and Lucía consulted; Andrés approves the budget and the calendar, and accepts the business risks.
Context
The store runs on nine rented machines, in a single data center, installed by hand. Adding capacity takes more than two hours, and scenario QS-2 asks for less than 15 minutes. The handover of the database primary is manual and exceeds the 5 minutes of scenario QS-3. The loss of the data center means 24 hours of downtime. Six ADRs, from 004 to 009, set the move to the cloud as a review condition. The team is three people, the spending limit is €500 a month on annual average, and the next campaign starts in March 2028.
Options considered
- A. Stay on the rented servers. Weighted score: 2.70. Solves neither QS-2 nor QS-3.
- B. NubeAtlas, with virtual machines only. Weighted score: 2.95. Moves the manual work somewhere else.
- C. NubeAtlas, with managed services. Weighted score: 3.80.
- D. NubeAtlas, rewriting the store as functions. Weighted score: 3.15. Contradicts ADR-001 and does not fit in the timeframe.
Decision
We adopt option C, in the
eu-sur-1region and in two zones. The following are contracted: a managed PostgreSQL database, with primary and standby in different zones, automatic failover, and one read replica; a managed Redis-compatible cache; a managed AMQP-compatible queue service; object storage; a managed load balancer, which terminates TLS; a secrets manager; and a managed VPN. The store and thenotification-servicekeep their code. How they are run will be decided in an ADR of its own. The CDN, the backups at the second provider, and the monthly restore are retained. The managed services encrypt their disks. The web application firewall, the key management service, and intrusion detection are not contracted for now, and remain accepted risks.Effect on the previous ADRs:
- ADR-004, queues. Kept. RabbitMQ becomes a managed service.
- ADR-005, horizontal scaling. Kept and extended with automatic capacity adjustment.
- ADR-006, high availability. Superseded by this ADR. The database fails over on its own, and Redis and RabbitMQ stop being single points of failure. PagoRaíz remains accepted as one.
- ADR-007, credentials. Superseded by this ADR. Secrets move from one file per server to the secrets manager, with automatic rotation of the three belonging to managed services.
- ADR-008, network. The three-zone design with default deny is kept. The bastion host is replaced by the managed VPN. Traffic to the cache and the queues is encrypted. mTLS is still not adopted.
- ADR-009, backups. Kept and extended with the managed backups, which allow recovering any instant of the last 14 days.
Consequences
Positive:
- The failure of the primary is resolved without human intervention.
- The loss of a data center no longer stops the store.
- The operating systems to patch in the data layer disappear.
Negative:
- The estimated average cost rises from €432 to €470 a month.
- During June and July both infrastructures are paid for: about €650, one time only.
- The launch of “Plant of the Month,” planned for before the summer, is postponed to September. Andrés accepts it: summer is the lowest-sales season, and the subscription will arrive with the autumn planting.
- The team loses control over the database's versions and maintenance windows.
Risks:
- A bill higher than expected. There will be budget alerts at €450 and at €500.
- A configuration error that exposes data. The responsibility is Verdalia's, not the provider's.
- Dependence on NubeAtlas. The work of moving to another provider is estimated at three weeks, thanks to the open protocols.
- The loss of the entire region. It is resolved with the external backups, and the recovery time will have to be measured.
Review conditions
To be reviewed if the cost exceeds €500 on average for three months, if NubeAtlas raises its prices by more than 15%, if a second region is needed, or if incidents attributable to the provider prevent meeting the monthly 99.9%.
The Plan
| Phase | Dates | What is done | Rollback |
|---|---|---|---|
| 0. Foundations | May 24 to June 4 | Account, network with three subnets in two zones, VPN, secrets manager, and budget alerts | Delete what was created |
| 1. Images | Tuesday, June 1 | The 52,000 images are copied. The CDN changes its origin | Point the CDN at the previous origin |
| 2. Staging | June 7 to 25 | The store and notifications, on NubeAtlas, with synthetic data. Load tests | Does not affect production |
| 3. Data | June 28 to July 9 | The managed database is created as a replica of verdalia-db-01, through an encrypted tunnel |
The current database remains the primary |
| 4. Cutover | Tuesday, July 13, at 7:00 a.m. | The store goes read-only for a few minutes, the managed database is promoted, and traffic is directed to the managed load balancer | Go back to the previous data center, which is kept intact |
| 5. Decommissioning | Friday, July 30 | The nine machines are given up | None: that is why it waits two weeks |
The order follows a rule: first what has no state and can be repeated, then the data, and finally the traffic. Every phase has a rollback, except the last.
Common Mistakes and Tips
- Migrating to save money. The cloud is rarely cheaper with stable load. You migrate for elasticity, for availability, and for the team's time.
- Rehosting and expecting the advantages of the cloud. The same machines somewhere else have the same problems, and a bigger bill.
- Believing that what is managed is the provider's responsibility. Data, permissions, and configuration always belong to the customer.
- Taking managed backups for granted. They are included. Restoring them is still a test that has to be done.
- Putting everything in one zone. You pay for the cloud and keep the single point of failure.
- Forgetting outbound transfer. And the environments left on without use.
- Choosing serverless, or discarding it, out of fashion. It is a tool for one type of load.
- Practical tip. Before migrating, configure the budget alert and tag the resources. Afterward it is too late: the first bill has already arrived.
Exercises
Exercise 1: Who Is Responsible
Verdalia is already on NubeAtlas. State who is responsible in each case, the provider or Verdalia:
- A critical vulnerability is published in the operating system of the managed database's servers.
- A badly written network rule leaves the database reachable from the internet.
- A power failure shuts down zone
eu-sur-1a. - The store was deployed only in zone
eu-sur-1a. - A team member uses the same password on NubeAtlas and on a forum that suffers a leak.
Exercise 2: The Break-Even Point of a Function
With the lesson's function pricing, calculate how much a request that lasts 0.25 seconds with 1 GB of memory costs. Then calculate from how many requests per month functions cost more than one compute unit switched on all month, which is €80.30. What do you conclude about Verdalia?
Solutions
Solution to Exercise 1
- The provider. The operating system of a managed service is theirs.
- Verdalia. Network configuration belongs to the customer.
- The provider is responsible for the failure.
- Verdalia. Spreading the application across zones is a design decision of the customer. The provider offers the zones, but does not force you to use them.
- Verdalia. Identities and their credentials belong to the customer. The measure is the second factor, which the panel has already required since Module 5.
Common mistake: answering “the provider” to the second and the fourth.
Solution to Exercise 2
One request costs €0.20 divided by one million, plus 0.25 seconds times 1 GB times €0.000017: €0.0000002 plus €0.00000425, that is, €0.00000445. Dividing €80.30 by that figure gives about 18 million requests per month, which is 7 requests per second sustained day and night.
Verdalia receives 1.8 million, ten times fewer. On compute, functions would come out cheaper. They are not ruled out because of the price, but because of the rewrite, because of the cold start, which hurts the 95th percentile, and because of the connections to PostgreSQL. The general conclusion is that the cost of an architecture is not only in the provider's bill. One candidate for the future is noted: image resizing, which is sporadic and in no hurry.
Conclusion
In this lesson you have learned the five characteristics that define the cloud, and that elasticity and pay per use are what distinguish it from a rented server. You have met the service models, from IaaS to SaaS, and the shared responsibility model, in which data, permissions, and configuration always belong to the customer. You have returned to serverless, with its cold start and its cost model. You have seen the deployment models, regions and zones, and the trade-off between managed and self-managed. You have walked through the providers and their equivalents, the selection criteria, the payment modes, and the six migration strategies.
In Verdalia, ADR-010 decides the move to NubeAtlas, with managed services in two zones, for an estimated €470 a month. It supersedes ADR-006 and ADR-007, and extends four others. The cutover will be on Tuesday, July 13.
The ADR leaves one sentence unresolved: “how they are run will be decided in an ADR of its own.” The database, the cache, and the queues will be services someone administers on Verdalia's behalf. The store will not: it is Verdalia's code, and it has to run somewhere. Installing it on virtual machines would mean reproducing the 38-step checklist somewhere else. What is needed is a way to package it with everything it needs, so that it runs the same on Íker's laptop, in staging, and in production, and so that a new copy is ready in seconds rather than hours. That is what the next lesson is about: “Containers and Orchestration.”
