Web Proxy Design Queries ?
- From: Mahendra Kumar Kutare <imax@xxxxxxxx>
- Date: Fri, 23 Nov 2007 22:21:56 -0500
Hi,
I am trying to implement a typical web proxy. If webserver and web proxy on the same machine then I intend to use shared memory , else sockets.
I have few design/architecture queries regarding the same -
a) What are the ways to find out that webserver/webproxy server are on the same machine ?
If web client is passing request as - webclient <threads> <proxy-server> <URL(http://...>
I am currently finding the IP address of local machine which is running webproxy server
and then comparing that with the <proxy-server> IP address passed from webclient ? Is
there any other way ?
b) How do i know that webserver which is running on a machine is my own webserver? Based on port number ?
c) In the case of multiple clients sending requests to same proxy server and then proxy server fetches response from multiple web server for different requests
Is there any efficient way to figure how to send response back to webclient other than maintaining a table to keep track of which socket reach request are listening/sending data to ?
This essentially is - HOW do i know the response sent by WEBSERVER is for a which particular CLIENT ?
c) Similar scenario as above , but now if i am using shared memory rather than sockets. How would I know when to fetch the data from shared memory ? Do I use standard producer/consumer paradigm ?
Any recommended ways ?
Thanks in advance,
Mahendra
.
- Prev by Date: Re: module license taints kernel.
- Next by Date: Re: lseek/write
- Previous by thread: transfer data from DMA into file
- Next by thread: Question on mmap() in 64-bit OS
- Index(es):
Relevant Pages
|