Repository navigation
Serve before backfilling - #105
Merged
Merged
Conversation
The environment authorization backfill ran between process start and the port opening, and it is one authorization write per environment. The liveness probe is tcp on the gRPC port -- three failures, ten seconds apart -- so a service with enough environments is killed before it finishes and restarts into the same backfill. A local platform reached that at 121 environments and crashlooped on work that had nothing left to do: every tuple it was writing already existed. Nothing waits on it. It is idempotent, it runs again on the next start, and a request arriving while it is in flight is answered by the tuples already there -- which is the same answer it would have got a moment later. So it goes in the background, and the port opens when the service is ready to serve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The environment authorization backfill ran between process start and the port opening, and it is one authorization write per environment.
The liveness probe is tcp on the gRPC port —
delay=10s timeout=1s period=10s #failure=3— so a service with enough environments is killed before it finishes, and restarts into the same backfill. A local platform reached that at 121 environments:It crashlooped on work that had nothing left to do — every tuple it was writing already existed. The cost is O(environments) on every start, so it gets worse as an organization uses the product.
Nothing waits on it: it is idempotent, it runs again on the next start, and a request arriving while it is in flight is answered by the tuples already there — the same answer it would have got a moment later. So it goes in the background, and the port opens when the service is ready to serve.