My original design was to have a fixed-length queue that handles most occasions. If there are too many requests, they will be blocked instead of being sent to the remote end. Furthermore, implementing variable-length queues increases the complexity of the implementation. Is there a better design?
我原本的设计是有一个固定长度的队列,用于处理大多数场合。如果请求过多,会被阻塞,而不是向远端发送。此外,实现变长队列会增加实现的复杂的。有更好的设计吗?
My original design was to have a fixed-length queue that handles most occasions. If there are too many requests, they will be blocked instead of being sent to the remote end. Furthermore, implementing variable-length queues increases the complexity of the implementation. Is there a better design? 我原本的设计是有一个固定长度的队列,用于处理大多数场合。如果请求过多,会被阻塞,而不是向远端发送。此外,实现变长队列会增加实现的复杂的。有更好的设计吗?