Reply to Re: Persistent connections not limited to one Apache-process?

Your name:

Reply:


Posted by Felix E. Klee on 10/14/02 11:18

At 10 Jun 2005 00:58:04 GMT,
Daniel Tryba wrote:
> Is there an actual problem with opening 1 tcp socket to the nntp
> server per http request?

Yes, it takes several seconds since:

1. For authenticating a user, the news server needs to contact a
PostgreSQL database twice (once for verifying UID and password, and
once for deciding which groups the user has access to).

2. The server hosting the PostgreSQL database is quite slow.

Some alternatives to opening a persistent connection to the news server:

* Cache the login and groups data in a simple database that doesn't take
as long to connect to as PostgreSQL.

* Open a persistent connection to the PostgreSQL database for the perl
scripts doing the authentication.

Both of the above solutions appear about as complex as opening a
persistent connection to the news server. So I'm not too fond of them,
especially as they will be a bit slower.

> If there is you can:
> -write a daemon like you suggested, can be written in any language you
> feel comfortale with (that includes php).

I'm unlikely the first person with such a problem, so I was hoping for a
pointer to a ready made solution.

> -switch (partially) to an other enviroment which actually has support
> for threading (eg Java/Servlets)

How could that help? However, concerning threading, it may be
interesting to try out how "pfsockopen" would behave with a
multithreaded Apache (see e.g. module MPM worker).

--
Felix E. Klee

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация