Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vanshajb10/multithreaded_web_server

This project demonstrates Java's multithreading capabilities!. High-performance, Multithreaded web server capable of handling up to 1 million concurrent requests. Built with Java, the server utilizes efficient thread management and thread pooling to ensure optimal resource utilization and minimal latency.
https://github.com/vanshajb10/multithreaded_web_server

java-8 multithreading

Last synced: about 1 month ago
JSON representation

This project demonstrates Java's multithreading capabilities!. High-performance, Multithreaded web server capable of handling up to 1 million concurrent requests. Built with Java, the server utilizes efficient thread management and thread pooling to ensure optimal resource utilization and minimal latency.

Awesome Lists containing this project

README

        

# MultiThreaded Web Server using Java

This project demonstrates Java's multithreading capabilities!.


High-performance, Multithreaded web server capable of handling up to 1 million concurrent requests.

Built with Java, the server utilizes efficient thread management and thread pooling to ensure optimal resource utilization and minimal latency.



What is a Server?




A Server serves static/dynamic content to users.



If too many (example 10k) clients hit the server --> multiprocessing server will open 10k threads. 1 thread for each request
Thread block of 10 k threads will consume too much memory and Resources of the system that it may crash.

Making it impossible to serve 10k RPS.

To solve this probem - a Thread Pool can be used.
It is a pool of Threads, ready to serve incoming requests.

Thread which is done with execution is reused again so no need to create more (> 100) threads.
Tasks wait in Queue till a thread is available to take up a task.