Autodiscover Independent coverage of news

API Design: A Practical Overview

By David Kim · · 1310 words
API Design: A Practical Overview

Log Analysis: The interesting number is not the average, it is the 99th percentile. Log Analysis: Adding a cache in front of a slow query is a fix; fixing the query is a cure. Log Analysis: Every abstraction you add is a place where behaviour can differ from intent.

Data Pipelines: Serving static bytes is the cheapest thing you can do at the edge. Data Pipelines: A schema is an interface; changing it is a migration, not an edit. Data Pipelines: Track the denominator as carefully as the numerator.

Crawl Budget: If the rollback plan needs a meeting, it is not a rollback plan. Crawl Budget: Small pages that stay small are easier to keep fast than large ones made fast. Crawl Budget: Write the invariant down; otherwise it lives only in someone's memory.

Access Control: The interesting number is not the average, it is the 99th percentile. Access Control: Adding a cache in front of a slow query is a fix; fixing the query is a cure. Access Control: Every abstraction you add is a place where behaviour can differ from intent.

The interesting number is not the average, it is the 99th percentile. That applies to release process as well. In practice, release process behaves differently: Adding a cache in front of a slow query is a fix; fixing the query is a cure. Every abstraction you add is a place where behaviour can differ from intent. The same reasoning holds for release process.

Periodic jobs should be safe to run twice, because they will be. This is most visible in storage tiers. Consider storage tiers specifically. You rarely need a new component to fix a boundary problem. Storage Tiers: The signal you want is often already logged, just not aggregated.

In practice, load balancing behaves differently: If a metric has no owner, it will drift until it causes an incident. The cheapest optimisation is usually removing work nobody asked for. The same reasoning holds for load balancing. For load balancing, the constraint matters more than the feature list. Aggregating at write time trades flexibility for predictable read cost.

A design that cannot be rolled back is a design that cannot be changed safely. That applies to backup strategy as well. In practice, backup strategy behaves differently: Latency budgets are easier to defend when every hop has a stated ceiling. Caching helps only until the invalidation rules become the bottleneck. The same reasoning holds for backup strategy.

Schema Markup: You can often replace a coordination problem with an idempotency key. Schema Markup: Anything that grows without a bound will eventually hit one. Schema Markup: Documentation that is not tested tends to describe the previous version.

Teams working on search indexing usually discover this the hard way. Serving static bytes is the cheapest thing you can do at the edge. A schema is an interface; changing it is a migration, not an edit. This is most visible in search indexing. Consider search indexing specifically. Track the denominator as carefully as the numerator.

Monitoring Alerts: The first thing to settle is the failure mode, not the happy path. Monitoring Alerts: Measurements taken once are anecdotes; you need a baseline that repeats. Monitoring Alerts: Costs usually concentrate in a small number of operations, so find those first.

Many screens can be completed with urine, blood or self-collected swabs. A genital or pelvic examination is not automatically required for an STI screen; a clinician may suggest one if symptoms or another clinical question make it relevant. You can ask what an examination would involve and why it is being offered. You may ask to pause or stop at any point, and consent to one part of an appointment does not mean consent to every part.

Cloud Infrastructure: If a metric has no owner, it will drift until it causes an incident. Cloud Infrastructure: The cheapest optimisation is usually removing work nobody asked for. Cloud Infrastructure: Aggregating at write time trades flexibility for predictable read cost.

The first thing to settle is the failure mode, not the happy path. This is most visible in cost controls. Consider cost controls specifically. Measurements taken once are anecdotes; you need a baseline that repeats. Cost Controls: Costs usually concentrate in a small number of operations, so find those first.

Routine sexual-health screening is a preventive check for sexually transmitted infections (STIs), often offered to people who have no symptoms. It may include a discussion of sexual history and one or more tests, but there is no single panel used everywhere. The tests recommended depend on a person’s health, the kinds of sexual contact they have had, timing, pregnancy status and local guidance.

Teams working on log analysis usually discover this the hard way. A design that cannot be rolled back is a design that cannot be changed safely. Latency budgets are easier to defend when every hop has a stated ceiling. This is most visible in log analysis. Consider log analysis specifically. Caching helps only until the invalidation rules become the bottleneck.

Pressure can also interfere with a free choice. Repeated requests after a refusal, threats, intimidation or using someone’s dependence or vulnerability to influence them are not respectful ways to seek agreement. Differences in authority or power can make it harder for a person to refuse, even without an explicit threat. A responsible check-in leaves room for an honest no and does not punish, shame or bargain with someone for setting a boundary.

Serving static bytes is the cheapest thing you can do at the edge. The same reasoning holds for content delivery. For content delivery, the constraint matters more than the feature list. A schema is an interface; changing it is a migration, not an edit. Teams working on content delivery usually discover this the hard way. Track the denominator as carefully as the numerator.

The first thing to settle is the failure mode, not the happy path. This is most visible in storage tiers. Consider storage tiers specifically. Measurements taken once are anecdotes; you need a baseline that repeats. Storage Tiers: Costs usually concentrate in a small number of operations, so find those first.

Serving static bytes is the cheapest thing you can do at the edge. The same reasoning holds for cloud infrastructure. For cloud infrastructure, the constraint matters more than the feature list. A schema is an interface; changing it is a migration, not an edit. Teams working on cloud infrastructure usually discover this the hard way. Track the denominator as carefully as the numerator.

In practice, access control behaves differently: If a metric has no owner, it will drift until it causes an incident. The cheapest optimisation is usually removing work nobody asked for. The same reasoning holds for access control. For access control, the constraint matters more than the feature list. Aggregating at write time trades flexibility for predictable read cost.

A boundary can change as a person’s comfort, health, relationship or circumstances change. Checking in does not mean asking for repeated permission in a way that becomes pressure; it means making space for an honest answer. Agree on a simple way to pause, such as a clear word or phrase, and treat it as a stop signal. If someone changes their mind, the other person should stop without demanding an explanation.

Search Indexing: A design that cannot be rolled back is a design that cannot be changed safely. Search Indexing: Latency budgets are easier to defend when every hop has a stated ceiling. Search Indexing: Caching helps only until the invalidation rules become the bottleneck.

Consider observability specifically. The interesting number is not the average, it is the 99th percentile. Observability: Adding a cache in front of a slow query is a fix; fixing the query is a cure. Every abstraction you add is a place where behaviour can differ from intent. That applies to observability as well.

Related reading