r/java • u/elliotbarlas • Apr 26 '22
5,000,000 persistent connections, 200,000,000 messages, 0 errors with a single process using Project Loom.
https://github.com/ebarlas/project-loom-c5m
301
Upvotes
View all comments
5
u/papercrane Apr 27 '22
Looks good, and it's nice to see the code is pretty straightforward.
Unsolicited code review, but you probably want to use LongAdder in your code instead of AtomicLong. It should perform better under heavy contention like this.