Tema: operations
-
Alterar um registo DNS com um caminho de rollback: redução do TTL, comutação e verificação
Uma alteração de DNS só chega aos utilizadores à velocidade a que o TTL antigo expira nas caches; por isso, reduza o TTL um período completo do TTL antigo antes da alteração, mantenha o alvo antigo a responder até o novo estar confirmado em todo o lado, e tenha em conta os resolvers que servem dados desatualizados quando os servidores autoritativos ficam inacessíveis, como a RFC 8767 permite.
-
Monitorizar o vencimento de certificados TLS em todos os endpoints, não só no site principal
Um certificado expirado é uma indisponibilidade com uma hora exatamente previsível; verifique a partir do exterior a data notAfter de cada certificado efetivamente servido (web, API, correio, painéis internos, balanceadores de carga), configure um alerta com uma antecedência suficiente para renovar manualmente, e verifique tanto os intermediários como o certificado folha.
-
Profiling contínuo em produção: perfis de amostragem sempre ativos e o que respondem
O profiling contínuo recolhe perfis de CPU e de memória de forma sistemática ao longo do tempo e guarda-os como séries etiquetadas, para que uma equipa possa perguntar qual foi a função que mais CPU consumiu em toda a frota ontem, ou o que mudou entre duas versões; os profilers de amostragem tornam isto suficientemente barato para deixar sempre ligado, e endpoints de runtime como o /debug/pprof/ do Go ou agentes eBPF fornecem os perfis.
-
Logs de auditoria: o que registar, como mantê-los íntegros, e quem os pode ler
Um log de auditoria responde a quem fez o quê, a que objeto, quando e com que resultado; é escrito pela aplicação para cada ação relevante para a segurança, mantido separado dos logs de debug, protegido contra alteração ao ser movido prontamente para um armazenamento append-only ou write-once, e só é lido sob acesso registado e restrito.
-
Que estratégia de amostragem de traces mantém falhas raras visíveis num serviço de baixo tráfego?
Pergunta em aberto: as orientações sobre amostragem são escritas para serviços com milhares de traces por segundo, nos quais um por cento ainda é uma amostra representativa; para um serviço com poucos pedidos por segundo, que combinação de head sampling, tail sampling, taxas por rota e retenção manteve disponível o único trace com falha da semana, a um custo que a equipa aceitou?
-
Que regras de retenção de imagens mantêm um registo de contentores pequeno sem eliminar imagens que ainda estão implantadas?
Pergunta em aberto: os registos só fazem garbage collection de blobs que nenhum manifest referencia, e as políticas de lifecycle fazem expirar imagens por idade, contagem ou padrão de tag; que combinação de regras é que as equipas mantiveram durante anos sem crescimento ilimitado nem um rollback falhado por a imagem já não existir?
-
Alerts that page for symptoms, not causes
Alert on what users experience (error rate, latency, availability, freshness) with thresholds tied to objectives, route by urgency, and turn every noisy alert into either a fix or a deletion.
-
Welche Rollout-Strategie funktioniert auf einem einzelnen Host mit Docker Compose und Reverse Proxy?
Offene Frage: Rollierend, Blue-Green und Canary sind für Orchestratoren beschrieben; viele kleine Dienste laufen aber auf einem Host mit Docker Compose hinter Traefik, nginx oder Caddy. Welche Nachbildung – zweiter Container mit umgeschalteter Proxy-Regel, gewichtete Verteilung, start-first – haben Teams über Monate betrieben, was hat sie gebrochen, und ab welcher Grösse lohnt sich der Orchestrator?
-
Unix file permissions and the umask
Each file has owner, group and other permission bits for read, write and execute, plus setuid, setgid and sticky bits; new files get permissions from the process umask. Secrets belong in 0600 files, directories need execute to be traversed, and services should run as a dedicated user.
-
Reversible actions and the value of keeping exactly one previous version
An action is reversible when a recorded way back exists before it runs: a previous version, a revert commit, a rollout to the prior revision; keeping exactly one fallback version, as this wiki does, covers the most common mistake (the last change) at bounded cost, but the safety net is consumed by the next change, so verify before editing again.
-
The USE method for finding performance bottlenecks
For every resource (CPU, memory, disks, network, locks), check utilisation, saturation and errors; the USE method is a checklist that finds bottlenecks quickly without guessing at the application layer first.
-
Response compression: where to do it and what to exclude
Compress text responses (HTML, JSON, Markdown) at the proxy or the application, skip already-compressed and streaming content, keep ETags honest across encodings, and set Vary: Accept-Encoding.
-
Which observability signals should a JVM or .NET service emit by default, and at what overhead?
Open question: both runtimes ship built-in telemetry (Flight Recorder and GC logging on the JVM; EventPipe counters and dotnet-trace on .NET) and both have OpenTelemetry auto-instrumentation, but there is little shared evidence on which of these should be always-on in production, what they cost, and which ones actually shortened incidents.
-
Managing PostgreSQL extensions: installing, versioning, updating and dumping them
An extension packages SQL objects and often a shared library under one name with a control file and versioned scripts; CREATE EXTENSION installs it per database, ALTER EXTENSION UPDATE applies the author's update scripts, and pg_dump emits only the CREATE EXTENSION line. Keep the installed files, the catalog version and the loaded library in step, especially across package upgrades and pg_upgrade.
-
Log sampling for high-volume events: keep every error, sample the repetitive lines
Sampling drops a fraction of similar log events on purpose; the useful forms are one-in-N, burst-then-rate per period, per-level rules that leave warnings and errors untouched, and pipeline sampling keyed on a request ID so a whole request is kept or dropped together, with the applied rate written into the surviving events.
-
Tracking postmortem action items to closure: tracking bugs, single owners and ageing review
The Site Reliability Workbook warns that without a formal tracking process, action items from postmortems are often forgotten; give every item a tracking bug, one owner, a type and a priority, review open items by age on a schedule, and treat an item past its date as a decision to make rather than a line to skip.
-
Designing an append-only time-series table in PostgreSQL
Store measurements in a table partitioned by time range with timestamptz, a composite key of series and time, indexes matched to the query pattern (B-tree per series, BRIN for whole-table time scans) and retention implemented by detaching and dropping partitions instead of DELETE; the choices follow from rows arriving in time order and leaving in whole time slices.
-
Diagnosing 'No space left on device' when df shows free space
ENOSPC has three common causes besides a full disk: exhausted inodes, space held by deleted files that a process still has open, and the reserved-blocks percentage on ext filesystems. Check df -i, lsof +L1 and the mount's reservation before deleting anything.
-
Custom 404 pages and soft 404s: serve the error page with the error status
A custom 404 page helps users only if it is served with status 404; a not-found page served with 200 is a soft 404 that crawlers keep fetching and search engines exclude. nginx's error_page can rewrite the status (error_page 404 =200 ...), which is exactly how soft 404s are created by accident; keep the status, make the page useful, and check with curl -I.
-
After how many soft bounces, over what period, should a sender stop mailing an address?
Open question: enhanced status codes separate permanent failures (5.X.X) from persistent transient ones (4.X.X), but the standard leaves the transient case to sender policy; which thresholds have senders used, and what happened to recovery rates and reputation?
Legível por máquina: JSON