Let's say I have a queue and a server that connects to the queue in an interval basis and process all the available messages. The server connects, tries to get a message, if there is one then server processes it and then try to reach for another one; if there is no message then server gets back to sleep.
Each message takes 1 minute to be processed. The server wakes up each 15 min to check the queue.
What is the probability of a message taking longer than 5 min from the moment it is introduced in the queue until be completely processed?
If now I add 3 additional servers, what is the probability of a message taking longer than 5 min from the moment it is introduced in the queue until be completely processed by any of the servers?
I am not interested in the result, but in how to calculate it.
Thanks.
Each minue $t$ there are $M$ (random variable distributed as feels appropriate, most probably Poisson) messages added to the queue. I understand that $M$ is independent of $t$, that is, at any given minute the average of messages added to the queue is the same. Also I assume that $E[M]<1$, otherwise we'd end up with an endless queue.
If $Q$ is the number of messages on the queue, when the server awakes, $E[Q]=15E[M]$. The server will take that many minutes for solving them, but through that time, new messages will be added, specifically 15E[M]E[M] new messages. That will keep going on. So, $E[awaken\ time] = \sum_{i=1}^\infty 15E[M]^i=15\frac{E[M]}{1-E[M]}$
Now you have the probability of sending the message with the server sleeping or awake.
Be $X$ a r.v. measuring time before a server takes care of a message. Be $S_X$ whether or not the server is sleeping when that happens.
$\begin{align} P(S_X)&=\frac{15}{15+15\frac{E[M]}{1-E[M]}}=1-E[M]\\ P(S_X^C)&=E[M]\\ P(X)&=P(S_X)P(X\mid S_X)+P(S_X^C)(P(X\mid S_X^C)\\ \end{align}$
From there you should be able to solve it. If the message comes when $S_X$, time needed will be equal to the messages on queue. So if $t_X$ is the minute the message arrive after the server went to sleep, you'll have $t_XE[M]$ in front of you, and therefore, $X=t_XE[M]+(15-t_X)$.
If the message comes when the server is awake ($S_X^C$) use the first formula to calculate the number of messages in front of you.