Help to boost the performance of my proxy server
Out of my personal interest, I am developing a proxy server in java for enterprises.
I've made the design as such the user's request would be given to the server through the proxy software and the response would hit the user's browsers through the proxy server.
User - > Proxy software - > Server
Server -> Proxy software -> User
I've designed the software in java and it is working
fine with HTTP and HTTPS requests.The problem which i am so scared is,
for each user request i am creating a thread to serve. So concurrently if 10000 users access the proxy server in same time,
I fear my proxy server would be bloated by consuming all the resources in the machine where the proxy software is installed.This is because,i'm using threads for serving the request and response.
Is there any alternative solution for this in java?
Somebody insisted me to use Java NIO.I'm confused.I need a solution
for making my proxy server out of performance issue.I want my
proxy server would be the first proxy server which is entirely
written in java and having a good performace which suits well for
even large organisations(Like sun java web proxy server which has been written in C).
How could i boost the performace?.I want the users should have no expereience of accessing the remote server through proxy.It would be like accessing the web server without a proxy for them.There should be not performance lagging.As fast as 'C Language'.I need to do this in java.Please help.

