LSLínguas Sem BenaventeInglês para brasileiros

Aula

Cloud e infraestrutura B1

Nível: B1

Objetivo

Explicar arquitetura e operações de cloud em inglês usando instance, container, region, storage, network, load balancer e environment variable, descrevendo deploys, configuração e ajustes de capacidade para o time.

Explicação

Em discussões de infraestrutura, alguns termos funcionam como peças fixas. Instance é uma máquina virtual provisionada na nuvem para rodar sua aplicação: `We launched two new instances in the same region.` Em AWS, GCP ou Azure, instance é sinônimo curto de virtual machine. Container é um pacote leve que junta código, dependências e configuração: `Each container runs the same image, so the behavior is consistent across environments.` Containers costumam ser orquestrados por ferramentas como Kubernetes, ECS ou Nomad.

Region é a área geográfica onde seus recursos ficam hospedados (por exemplo, `us-east-1`, `sa-east-1`, `eu-west-2`). Dentro de uma region existem availability zones (datacenters isolados) que você usa para distribuir carga e ganhar resiliência. Para escolher a region, vale considerar três coisas: onde estão seus usuários (latência), onde estão os dados (compliance) e quais serviços estão disponíveis (nem todo serviço existe em toda region).

Storage é o serviço responsável por guardar arquivos, logs, backups e estado: `We moved the backups from block storage to object storage.` Os dois sabores mais comuns são `block storage` (disco anexado a uma instance) e `object storage` (serviço como S3, com chaves e URLs). Network é o que conecta tudo: VPCs, subnets, security groups e rotas. Ao descrever rede, diga o que está conectado a quê e por quê: `The API runs in a private subnet, and the load balancer is in a public subnet.`

Load balancer distribui tráfego entre várias instances ou containers: `The load balancer sends each request to a healthy instance.` Antes de adicionar uma instance ao balanceamento, ela passa por um health check — uma checagem simples (por exemplo, `GET /health` retornando 200). Se a instance falhar o health check, o load balancer para de mandar tráfego para ela.

Environment variable é uma configuração externa lida pela aplicação em tempo de execução: `The database URL is set as an environment variable in the container config.` Boas práticas: nunca commitar environment variables no código, guardar secrets em um cofre (Vault, AWS Secrets Manager, etc.) e separar configuração de código (o mesmo build roda em dev, staging e prod com environment variables diferentes).

Deploy é colocar uma nova versão em produção: `We deployed the new release to the staging environment yesterday.` Em um pipeline moderno, deploy passa por build, testes, image push e rollout. Quando algo dá errado, use rollback para voltar à versão anterior: `The deploy was rolled back after the health checks started failing.` Rollback rápido é mais importante do que rollback perfeito — estabilidade vem antes de perfeição.

Para explicar um deploy, siga um mini-roteiro: o que mudou (`We deployed a new container image`), em qual ambiente (`to the staging cluster`), o que foi validado (`the health checks passed`), o que falhou (`the new environment variable was missing`) e a próxima ação (`we configured the variable and redeployed`). Esse padrão `what → where → what was validated → what failed → next step` é o mesmo em post-mortems e incident reviews.

Para falar de capacidade e resiliência, combine três termos: autoscaling (ajustar o número de instances automaticamente), health check (validar se a instance está saudável) e region (espalhar carga geograficamente). `We enabled autoscaling based on CPU, so the cluster adds new instances when traffic spikes.` Lembre que autoscaling não é instantâneo: leva cerca de um minuto para subir uma instance nova, então o sistema precisa tolerar esse atraso.

Exemplos

InglêsTraduçãoObservação
We launched two new instances in the same region to handle the afternoon traffic spike.Subimos duas instances novas na mesma region para aguentar o pico de tráfego da tarde.Instance = máquina virtual na nuvem; region = área geográfica.
Each container runs the same image, so the behavior is consistent across environments.Cada container roda a mesma image, então o comportamento é consistente entre ambientes.Container e image são os termos centrais de uma arquitetura containerizada.
The load balancer sends each request to a healthy instance, and it stops sending traffic to instances that fail the health check.O load balancer envia cada requisição para uma instance saudável, e para de mandar tráfego para instances que falham o health check.Health check é o teste simples que decide quem recebe tráfego.
We moved the backups from block storage to object storage to reduce costs.Movemos os backups de block storage para object storage para reduzir custo.Block storage é disco anexado; object storage é serviço como S3 com chaves e URLs.
The database URL is set as an environment variable in the container configuration, not in the code.A URL do banco é definida como environment variable na configuração do container, não no código.Environment variable é a forma padrão de separar configuração de código.
We deployed the new release to the staging environment yesterday, and the rollout finished in under five minutes.Fizemos o deploy da nova release no ambiente de staging ontem, e o rollout terminou em menos de cinco minutos.Deploy + to the + environment é o padrão para descrever rollout.
The deploy was rolled back after the health checks started failing in the production environment.O deploy foi revertido depois que os health checks começaram a falhar no ambiente de produção.Rolled back é o passado de rollback e descreve voltar para a versão anterior.

Erros comuns

  • Trocar 'instance' por 'container' ao descrever uma VM clássica; use instance para máquinas virtuais e container para pacotes leves orquestrados (Kubernetes, ECS).
  • Dizer 'in the cloud of us-east-1' em vez de 'in the us-east-1 region'; region é o nome do lugar, não precisa de 'cloud of'.
  • Confundir 'storage' e 'database'; storage guarda arquivos e blobs (S3, GCS), database guarda dados estruturados com schema (Postgres, MySQL).
  • Escrever 'a load balance' em vez de 'a load balancer'; o substantivo sempre leva -er no final.
  • Commitar environment variables no repositório; isso vaza credenciais e força redeploy para mudar configuração.
  • Dizer 'we deployed to production' sem dizer como o deploy foi feito; sempre mencione o ambiente (staging, canary, production) e o que foi validado.
  • Misturar 'rollback' e 'rollout'; rollback volta para a versão anterior, rollout é a distribuição da versão nova.

Prática guiada

Reescreva cada nota em uma explicação curta de infraestrutura, seguindo o padrão `what → where → what was validated → what failed → next step`:

  • Nota solta: `subimos um container novo no staging.`
  • Em explicação: `We deployed a new container image to the staging environment, the health checks passed for the first ten minutes, and then one of the environment variables was missing, so the rollout failed. We will configure the variable and redeploy.`

  • Nota solta: `o load balancer estava mandando tráfego para uma instance quebrada.`
  • Em explicação: `The load balancer kept sending traffic to an instance that had already failed the health check, so users saw 502 errors. We will fix the health check timeout and redeploy the load balancer configuration.`

  • Nota solta: `colocamos os backups no S3.`
  • Em explicação: `We moved the daily backups from block storage to object storage in the same region, which reduced the storage cost by about sixty percent. We will keep one copy in a second region for disaster recovery.`

Note que cada explicação nomeia o que mudou, em qual region ou ambiente, o que foi validado, o que falhou e a próxima ação concreta.

Resumo

Instance é uma máquina virtual na nuvem, container é um pacote leve que roda a mesma image em qualquer ambiente, region é a área geográfica onde os recursos ficam, storage guarda arquivos e backups, network conecta os recursos, load balancer distribui tráfego entre instances saudáveis validadas por health checks, e environment variable é a configuração externa lida pela aplicação. Para explicar um deploy, siga `what → where → what was validated → what failed → next step`; para explicar capacidade, combine autoscaling, health check e region.

Vocabulário

Palavras principais

18 itens
instanceinstance; máquina virtual provisionada na nuvem

We launched two new instances in the same region.

Subimos duas instances novas na mesma region.
containercontainer; pacote leve que junta código e dependências

Each container runs the same image, so the behavior is consistent across environments.

Cada container roda a mesma image, então o comportamento é consistente entre ambientes.
imageimage; pacote imutável usado para criar containers ou instâncias

We built a new container image with the latest security patches.

Construímos uma image de container nova com os patches de segurança mais recentes.
regionregion; área geográfica onde os recursos da nuvem ficam

We chose the sa-east-1 region to keep the data inside Brazil.

Escolhemos a region sa-east-1 para manter os dados dentro do Brasil.
availability zoneavailability zone; datacenter isolado dentro de uma region

We spread the instances across three availability zones for resilience.

Distribuímos as instances em três availability zones para resiliência.
storagestorage; serviço para guardar arquivos, backups e logs

We moved the backups from block storage to object storage to reduce costs.

Movemos os backups de block storage para object storage para reduzir custo.
object storageobject storage; serviço de armazenamento com chaves e URLs (S3, GCS)

Static assets are served from object storage through a CDN.

Os assets estáticos são servidos a partir do object storage via CDN.
networknetwork; rede que conecta recursos na nuvem (VPC, subnets, rotas)

The API runs in a private subnet, and the load balancer is in a public subnet.

A API roda em uma subnet privada, e o load balancer está em uma subnet pública.
load balancerload balancer; serviço que distribui tráfego entre várias instances

The load balancer sends each request to a healthy instance.

O load balancer envia cada requisição para uma instance saudável.
health checkhealth check; teste que verifica se uma instance está saudável

If an instance fails the health check, the load balancer stops sending traffic to it.

Se uma instance falhar o health check, o load balancer para de mandar tráfego para ela.
environment variableenvironment variable; configuração externa lida pela aplicação em tempo de execução

The database URL is set as an environment variable in the container configuration.

A URL do banco é definida como environment variable na configuração do container.
to deploydeploy; colocar uma nova versão em produção

We deployed the new release to the staging environment yesterday.

Fizemos o deploy da nova release no ambiente de staging ontem.
rolloutrollout; distribuição progressiva de uma nova versão

The rollout finished in under five minutes, with no errors in the logs.

O rollout terminou em menos de cinco minutos, sem erros nos logs.
to roll backrollback; voltar para a versão anterior após um deploy com problema

The deploy was rolled back after the health checks started failing.

O deploy foi revertido depois que os health checks começaram a falhar.
configurationconfiguration; ajustes que controlam o comportamento do serviço

We updated the load balancer configuration to enable sticky sessions.

Atualizamos a configuration do load balancer para habilitar sticky sessions.
to configureconfigurar; ajustar as opções de um serviço

We configured the environment variable through the deployment pipeline.

Configuramos a environment variable pelo pipeline de deploy.
autoscalingautoscaling; ajuste automático do número de instances

We enabled autoscaling based on CPU, so the cluster adds new instances when traffic spikes.

Habilitamos autoscaling baseado em CPU, então o cluster adiciona instances novas quando o tráfego sobe.
to scaleescalar; aumentar ou diminuir a capacidade do sistema

We need to scale the API to handle the holiday traffic.

Precisamos escalar a API para aguentar o tráfego de fim de ano.

História

História: Cloud e infraestrutura B1

Nível: B1

História em inglês

Choosing the right region

On Monday morning, Maya, a backend engineer, opened a ticket to deploy the new checkout service to the cloud. Her team had to pick a region first, and the product manager asked, "Should we use us-east-1 or sa-east-1?" Maya answered, "Most of our users are in Brazil, so we should use the sa-east-1 region to keep latency low and respect data residency." She also said, "We will spread the instances across three availability zones in the region, so a single datacenter failure won't take the service down."

Configuring the service

After the region was chosen, Maya configured the network: a public subnet for the load balancer and a private subnet for the instances and the database. She then created the environment variables for the database URL, the API key, and the feature flag values. "Never commit these values to the code," she reminded the team, "they go straight into the deployment pipeline configuration." The storage was the next decision: the team moved the static assets and the daily backups from block storage to object storage to reduce costs.

The deploy and the rollback

On Tuesday, Maya deployed the first container image to the staging environment, and the rollout finished in under five minutes. The load balancer sent traffic to the new instances, and the health checks passed for the first ten minutes. Then the team noticed a spike in 502 errors in the logs, and one engineer asked, "Did anyone check the new environment variables?" Maya checked the configuration and realized one environment variable for the payment provider was missing, so the instances were failing the health check. She said, "We need to roll back the deploy right now, configure the variable, and then redeploy the service." The team rolled back the deploy, the service went back to the previous version, and within an hour the new environment variable was configured and the redeploy was running smoothly. By the end of the day, the new version was live in the sa-east-1 region, autoscaling was enabled, and uptime had returned to 99.95%.

Tradução linha por linha

InglêsTradução
On Monday morning, Maya, a backend engineer, opened a ticket to deploy the new checkout service to the cloud.Na manhã de segunda-feira, Maya, engenheira de backend, abriu um ticket para fazer o deploy do novo serviço de checkout na nuvem.
Her team had to pick a region first, and the product manager asked, "Should we use us-east-1 or sa-east-1?"O time dela tinha que escolher uma region primeiro, e a product manager perguntou: "Usamos us-east-1 ou sa-east-1?"
Maya answered, "Most of our users are in Brazil, so we should use the sa-east-1 region to keep latency low and respect data residency."Maya respondeu: "A maioria dos nossos usuários está no Brasil, então devemos usar a region sa-east-1 para manter a latência baixa e respeitar a residência de dados."
She also said, "We will spread the instances across three availability zones in the region, so a single datacenter failure won't take the service down."Ela também disse: "Vamos distribuir as instances em três availability zones dentro da region, então a falha de um único datacenter não derruba o serviço."
After the region was chosen, Maya configured the network: a public subnet for the load balancer and a private subnet for the instances and the database.Depois que a region foi escolhida, Maya configurou a network: uma subnet pública para o load balancer e uma subnet privada para as instances e o banco de dados.
She then created the environment variables for the database URL, the API key, and the feature flag values.Ela então criou as environment variables para a URL do banco, a API key e os valores das feature flags.
"Never commit these values to the code," she reminded the team, "they go straight into the deployment pipeline configuration.""Nunca commitem esses valores no código", ela lembrou o time, "eles vão direto na configuration do pipeline de deploy."
The storage was the next decision: the team moved the static assets and the daily backups from block storage to object storage to reduce costs.O storage foi a próxima decisão: o time moveu os assets estáticos e os backups diários de block storage para object storage para reduzir custo.
On Tuesday, Maya deployed the first container image to the staging environment, and the rollout finished in under five minutes.Na terça-feira, Maya fez o deploy da primeira image de container no ambiente de staging, e o rollout terminou em menos de cinco minutos.
The load balancer sent traffic to the new instances, and the health checks passed for the first ten minutes.O load balancer mandou tráfego para as instances novas, e os health checks passaram pelos primeiros dez minutos.
Then the team noticed a spike in 502 errors in the logs, and one engineer asked, "Did anyone check the new environment variables?"Então o time percebeu um pico de erros 502 nos logs, e um engenheiro perguntou: "Alguém conferiu as environment variables novas?"
Maya checked the configuration and realized one environment variable for the payment provider was missing, so the instances were failing the health check.Maya conferiu a configuration e percebeu que uma environment variable do provedor de pagamento estava faltando, então as instances estavam falhando o health check.
She said, "We need to roll back the deploy right now, configure the variable, and then redeploy the service."Ela disse: "Precisamos fazer rollback do deploy agora, configurar a variable e depois refazer o deploy do serviço."
The team rolled back the deploy, the service went back to the previous version, and within an hour the new environment variable was configured and the redeploy was running smoothly.O time fez rollback do deploy, o serviço voltou para a versão anterior, e em menos de uma hora a environment variable nova foi configurada e o novo deploy rodou sem problemas.
By the end of the day, the new version was live in the sa-east-1 region, autoscaling was enabled, and uptime had returned to 99.95%.No fim do dia, a versão nova estava no ar na region sa-east-1, autoscaling estava habilitado, e o uptime tinha voltado para 99,95%.

Notas de vocabulário

  • region = área geográfica onde os recursos da nuvem ficam; influencia latência, custo e catálogo de serviços
  • availability zone = datacenter isolado dentro de uma region; distribuir instances em várias AZs aumenta resiliência
  • load balancer = distribui tráfego entre instances; usa health checks para decidir quem recebe requisições
  • health check = teste simples (ex.: GET /health retornando 200) que diz se uma instance está saudável
  • environment variable = configuração externa injetada no container; nunca deve ir para o código-fonte
  • object storage = serviço de armazenamento com chaves e URLs (S3, GCS); bom para backups e assets estáticos acessados raramente
  • deploy = colocar uma nova versão em produção; deploy + to the + environment é o padrão
  • rollout = distribuição progressiva de uma nova versão; o tempo de rollout é métrica comum em incident reviews
  • roll back = verbo composto que descreve reverter um deploy; rollback como substantivo é o ato de reverter
  • autoscaling = ajuste automático do número de instances; baseado em CPU, memória ou métricas customizadas

Perguntas de compreensão

  1. Why did Maya choose the sa-east-1 region instead of us-east-1?
  2. How did Maya plan to protect the service from a single datacenter failure?
  3. What did Maya create for the database URL, the API key, and the feature flags?
  4. Why did the team move the static assets and the daily backups to object storage?
  5. What was wrong with the first deploy in the staging environment?
  6. What did the team do right after noticing the 502 errors?
  7. What was the uptime of the service at the end of the day?

Prática com a história

  1. Reescreva em uma frase curta: 'o load balancer estava mandando tráfego para uma instance que tinha falhado o health check.'
  2. Traduza: 'Movemos os backups do block storage para o object storage para reduzir custo.'
  3. Reescreva em formato de causa e efeito: 'adicionamos uma environment variable que estava faltando, então os health checks voltaram a passar.'
  4. Traduza: 'Habilitamos autoscaling baseado em CPU, então o cluster adiciona instances novas quando o tráfego sobe.'

Prática

Exercícios e teste

Próxima etapa
6blocos de exercícios disponíveis neste tema
10questões de teste para revisar depois da aula

A próxima melhoria é transformar esses arquivos em perguntas com resposta no navegador. Por enquanto, esta página já organiza o estudo e permite seguir a aula inteira sem abrir os arquivos manualmente.