• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt about Local port

 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On HFSJSP, page 123, it's written that the the server turns a request to a local port for each thread. Somewhere at the beginning of the book, I read that a PC can have up to 65535 (or something like that) ports. Does this mean that a server can't handle around 60.000 simultaneous requests for JVM?

Marco
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marco,

I don't that's what they meant. In the HF scenario, we're using Tomcat which runs on port 8080. All requests are directed to this port number. If you're using Weblogic, chances are your requests are sent to port 7001.

We can have many threads serving different requests & all these requests get directed to the port that your web container is configured to.

HTH.
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SO, what's the truth? Is there only one private port for all threads, or a port for every thread?
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO, I think all the requests are directed to a single port that the web container is using.

And the web container could have many threads to handle these requests coming in from that port.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Come think about it, it is nearly impossible for the threads to use different ports, otherwise, all ports will be used up, and one server can only serve for 1 appliaction.

Should we allow this?

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic