3 ms·
Instead of 16x consumer threads serving 16x producer threads, you probably would be more efficient with 8x consumer threads serving 24x producer threads. Or som
by dragontamer 7y ago
Instead of 16x consumer threads serving 16x producer threads, you probably would be more efficient with 8x consumer threads serving 24x producer threads. Or some other asymetrical arrangement. Its the classic "latency vs throughput" tradeoff, you decide that higher-latency is acceptable to increase throughput.
Or you don't make that decision. For some people, latency is more important. It really depends on your specific situation.
Async architectures seem to scale better. So maybe its worth looking into async instead of blocking to avoid task-switching.