I'm building a software system where constructing a new object takes a few minutes, say T minutes. I can create up to K objects in parallel. Users come randomly and request an object, but they are not willing to wait several minutes for an object to be created. Requests per minute can I think be modeled by a Poisson distribution with parameter L. (It's a bit more complicated since there are more requests in the daytime, but I think I can address that by adjusting L).
So to keep users happy I am building a pool, which will hold a number of objects N. When a request comes in, I provide a ready-made object from the pool, and create another one to replace it in the background before the next user arrives. I have to pay to keep objects alive, so I don't want to create more than necessary. So I'd like to estimate a pool size N where the probability P that the pool will run out of resources (assuming requests per minute follows the expected distribution, and I can create K new objects every T minutes) is less than 1%.
This seems like a queuing problem, but instead of trying to minimize queue length, I'm trying to minimize pool size while keeping users happy. I'm not really sure how to model this, and would appreciate any suggestions!