Currently, if the same post is requested multiple times at once, and needs to be rendered, every request will try to do the render at the same time. This can cause slowdowns at best and race conditions at worst.
As such, there should be a queue shared across all instances (hypercorn seems to spawn multiple from what I've seen) that keeps a list of ongoing renders and prevents this from happening. (Note that this doesn't mean renders can only work on one thread - in fact, they should be multithreaded, though perhaps the queue is also a good occasion to limit the amount of possible concurrent renders).
Currently, if the same post is requested multiple times at once, and needs to be rendered, every request will try to do the render at the same time. This can cause slowdowns at best and race conditions at worst.
As such, there should be a queue shared across all instances (hypercorn seems to spawn multiple from what I've seen) that keeps a list of ongoing renders and prevents this from happening. (Note that this doesn't mean renders can only work on one thread - in fact, they should be multithreaded, though perhaps the queue is also a good occasion to limit the amount of possible concurrent renders).