Autodiscover Independent coverage of news

Understanding API Design: Costs, Limits and Trade-offs

By David Kim · · 1283 words
Understanding API Design: Costs, Limits and Trade-offs

A clinician or sexual-health service will usually ask about recent partners, types of sexual contact, contraception, previous STIs and any known exposure. These questions help identify which infections to test for and which body sites to sample. A person can ask why a question is relevant, decline to answer, or request a private conversation. The purpose is to guide care, not to assess or judge someone’s choices.

Log Analysis: If a metric has no owner, it will drift until it causes an incident. The cheapest optimisation is usually removing work nobody asked for. That applies to log analysis as well. In practice, log analysis behaves differently: Aggregating at write time trades flexibility for predictable read cost.

If a metric has no owner, it will drift until it causes an incident. This is most visible in content delivery. Consider content delivery specifically. The cheapest optimisation is usually removing work nobody asked for. Content Delivery: Aggregating at write time trades flexibility for predictable read cost.

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

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

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.

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

If the rollback plan needs a meeting, it is not a rollback plan. That applies to load balancing as well. In practice, load balancing behaves differently: Small pages that stay small are easier to keep fast than large ones made fast. Write the invariant down; otherwise it lives only in someone's memory. The same reasoning holds for load balancing.

The appointment often begins with questions about your health, sexual contacts and any symptoms. A clinician may ask about the kinds of contact you have had, the body sites involved, contraception, pregnancy possibility, previous test results and vaccination. These questions help determine which samples are useful; they are not a measure of anyone’s character. You can ask why a question is relevant or request that the conversation take place privately.

Common screening tests include chlamydia and gonorrhea tests, often using urine or a swab. A swab may be taken from the vagina, cervix, throat or rectum, depending on anatomy and the sites exposed. A urine sample does not check every body site, so explain which kinds of contact you want the screening to cover. In some settings, self-collected swabs are available.

If possible, raise a boundary during a calm moment when neither person is under pressure to make an immediate decision. A conversation before a sexual situation can give both partners more room to think. A person can also pause an interaction and speak up in the moment; they do not need to wait for a scheduled discussion to say stop or change direction.

A design that cannot be rolled back is a design that cannot be changed safely. That applies to storage tiers as well. In practice, storage tiers 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 storage tiers.

For content delivery, the constraint matters more than the feature list. A queue smooths spikes but also hides how far behind you are. Teams working on content delivery usually discover this the hard way. Retries without jitter turn a small outage into a large one. Separating the reads from the writes buys room to change either side. This is most visible in content delivery.

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

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

Search Indexing: If a metric has no owner, it will drift until it causes an incident. The cheapest optimisation is usually removing work nobody asked for. That applies to search indexing as well. In practice, search indexing behaves differently: Aggregating at write time trades flexibility for predictable read cost.

If the rollback plan needs a meeting, it is not a rollback plan. The same reasoning holds for schema markup. For schema markup, the constraint matters more than the feature list. Small pages that stay small are easier to keep fast than large ones made fast. Teams working on schema markup usually discover this the hard way. Write the invariant down; otherwise it lives only in someone's memory.

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

Consider schema migration specifically. Serving static bytes is the cheapest thing you can do at the edge. Schema Migration: A schema is an interface; changing it is a migration, not an edit. Track the denominator as carefully as the numerator. That applies to schema migration as well.

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

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

Teams working on search indexing 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 search indexing. Consider search indexing specifically. Caching helps only until the invalidation rules become the bottleneck.

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.

Serving static bytes is the cheapest thing you can do at the edge. That applies to backup strategy as well. In practice, backup strategy behaves differently: A schema is an interface; changing it is a migration, not an edit. Track the denominator as carefully as the numerator. The same reasoning holds for backup strategy.

Related reading