letsencrypt / letsencrypt/boulder
Reduce inaccurate 404s by adding structure to ACME object URLs
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
Now that we're doing more with sending traffic to replicas, we have a problem where sometimes a user creates an object (account, order, authzs), and then immediately fetches that object. If they hit a replica for the fetch, and the replica is lagged, they might get a 404.
At a minimum we'd like to turn these 404s into something more informative that indicates a retry might succeed (like a 5xx series error). We might also like to route such prospective 404s to the primary DB. But we don't want to send all 404s to the primary DB because that would be too much junk traffic.
We can start incorporating creation timestamp into the URLs of objects we create. This will allow us at request time to determine that an object was recently created, and query the primary DB if the query to the replica returns no answer.
To ensure that the timestamp is meaningful and not random junk, we can add an HMAC (ht @mcpherrinm).
Adding structure to ids will also be useful as we start to horizontally shard. It will be useful to know which shard an object was created in, or which datacenter.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating object ID and URL generation, then trace replica lookups for accounts, orders, and authzs. Done means a defined URL structure can identify recently created objects and support safer handling of replica 404s without routing every 404 to the primary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend-api-design, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100