LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-11-2006, 12:34 PM   #1
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Rep: Reputation: 15
Fork System call


Hi!

In a web server( Server) it may receive millions of request from many users or clients to handle these request whether it will allot an ephemeral port for each and every users???if this is happening whether the client will start communicating through this ephemeral port(whether the client will be intimated about the epheremeal port- no or not) If such epheremal ports are used by the clients whether this will not create any security issues.Can any one make this clear ?????
 
Old 07-12-2006, 05:42 AM   #2
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
On the server side, http requests are all received and answered on port 80. You may have several webserver processes/threads listening on that port to handle the numerous requests.

Does this answer your question ?
 
Old 07-13-2006, 02:58 AM   #3
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Hi zeitounator!!

Thanks for replying my query,

Ok so the user load will be balanced by creating number of threads listening to the port number 80 of a webserver.Whether this funda is same for all client and server architecture or it varies ??
 
Old 07-13-2006, 03:35 AM   #4
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
It varies depending on the webserver software you use, the way it is configured, the architecture it runs on, the available ressources and the load of the machine. Read your webserver software documentation for this matter.
 
Old 07-14-2006, 04:53 AM   #5
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Client Server archi

zeitounator!!!

But in case of normal client and server architecture a server will create an ephimeral port to overcome the load due to client request, so that further the server will start listening to the same port for other client request.Is there any realtime example for this???
 
Old 07-14-2006, 07:30 AM   #6
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
I don't understand what an "ephemeral port" is. Webservers usually listen on port 80 (and eventually 443 for https secure connection). I'm not aware of any other port they would listen to, even on an "ephemeral" basis.
 
Old 07-14-2006, 11:51 PM   #7
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Smile Epheremal Port

Hi zeitounator,


Ephemeral port I meant instead of making all the client to communicate using a single port(the whole process) the server after accepting the client request at port 80,immediately it forks and assign an ephemeral port to that particular client for further communication to take place with that client(Note:This port will be functional till the client is alive).This is in case of normal server and client architecture,but I am trying to find out some real time example for this...

Last edited by bangoram; 07-14-2006 at 11:53 PM.
 
Old 07-15-2006, 07:51 AM   #8
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
Ok I see, you're talking about openning a random port: there is no such thing for webserver softwares.

This is how, for example, an ftp server works when running in passive mode (making it a nightmare to configure a firewall on the server). But this is not the case for webservers: they use _ONLY_ port 80.

There are a lot of other server software acting the same such as mysql which uses only port 3306, or smtp only port 25, or ssh which uses only port 22 (unless you make tunnels with it) etc... So, opening a random port for further client/server communication is far from being a standard way of functionnning.

Now, there is a random port involved in http communication, but that one is not on the client side. To send each request, the client (browser) will pick a random port (> 2048) and will expect the answer comming on that port. But the request destination port and the answer source port are always port 80. See the http specification for that matter.

Cheers.

Last edited by zeitounator; 07-16-2006 at 10:11 AM.
 
Old 07-16-2006, 02:24 AM   #9
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Talking

Hi zeitounator,

This sounds a very good example/explanation that you had given...

Thanks a lot for your explanation...

Thanks..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming: fork, exec and system memory atienza Programming 2 08-24-2005 07:26 AM
Changing the fork system call seshuch Programming 0 10-02-2004 05:18 AM
X Error with system()/fork() aaa Programming 3 08-18-2004 05:05 PM
Is it possible to use system() and get the return value from the system call newguy21 Programming 1 08-11-2004 01:37 PM
Strange behaviour of fork call in Linux Uzair Programming 1 02-12-2003 01:37 PM


All times are GMT -5. The time now is 07:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration