My company will soon be featured on a television spot and when this happens our website can be overwhelmed by a sudden surge of traffic. To mitigate this we are adopting a waiting room strategy. We will divert a certain fraction of the traffic to static waiting page where a user's session will be forced to wait a minimum amount of time, once that time is expired the user's browser is allowed to access the site again and the die is rolled again. Each roll of the die is independent of all others, and so, theoretically, a user can be forced to wait for an unbounded length of time. (Once the user is let through, he bypasses the waiting room until he completes his visit)
I need a formula that will let me calculate the average wait time in the waiting room given the probability p of being allowed through to the site that ranges on the half open interval (0,1] and the minimum wait time in the waiting room w
For example p=0.8 and w=30 means that 80% of the requests will bypass the waiting room while 20% will be forced to wait 30 seconds before making another request. How long is the average wait in the wait room.