HN2new | past | comments | ask | show | jobs | submitlogin

> In an ideal world, we wouldn’t need queues. Who likes waiting in lines after all? This would only be possible if the arrival rate of items in a queue was less than or equal to the departure rate and there were no variability in either. Not likely to happen in the real world.

It's not only possible if there's no variability. It's only possible if the arrival rate is always less than number of available processing slots, which can be engineered in a number of ways. (e.g. ensuring that the number of processing units is oversupplied, i.e. exceeds the maximum arrival rate + departure rate; or altering number of processing units dynamically so that utilisation never exceeds 80%.)

However, these approaches are generally not the lowest cost approaches, and so are only used when queueing is incredibly undesirable, e.g. when the cost of maintaining the queue exceeds the cost of holding the spare capacity.

One example for oversupply is airports - most airports have enough gates that incoming aircraft never have to queue, despite that meaning that many gates are empty for most of the day.

For dynamically adjusting capacity examples include listening thread pools for network applications which can spin up new waiting threads whenever the pool free count drops below a certain threshold (the threshold being decided based on the maximum arrival rate). Or a cloud service which spins up new servers whenever cpu utilisation exceeds 80%.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: