| Article: |
The PHP Scalability Myth | |
| Subject: | Fundamental Platform Differences and why PHP scales better | |
| Date: | 2003-10-16 12:52:53 | |
| From: | anonymous2 | |
|
Response to: Fundamental Platform Differences and why PHP scales better
|
||
|
It's both a performance and scalability issue but perhaps wasn't specific enough simply to say "no databases".
|
||
Showing messages 1 through 6 of 6.
-
Fundamental Platform Differences and why PHP scales better
2003-10-16 12:58:36 anonymous2 [View]
MySQL is actually quite a bit faster than SQLite for simple single-key selects like this. It makes a good session database. Memcached (http://www.danga.com/memcached/) is good for this too. -
Fundamental Platform Differences and why PHP scales better
2003-10-16 20:21:09 anonymous2 [View]
MySQL HEAP tables could be an option too I think, the ones that stay in memory.
-
Fundamental Platform Differences and why PHP scales better
2003-10-17 10:23:50 anonymous2 [View]
That's what I use (with a custom sessions handler), and it works great.
-
Fundamental Platform Differences and why PHP scales better
2003-10-17 13:38:11 anonymous2 [View]
In an ideal world, yes, it would be fantastic to always have an up-to-date session store right in the same machine as the code that's trying to access it. Unfortunately, in any kind of horizontally scaled solution, it's not always possible. If you are dealing with a large group of users, there will come a point where your HTTP front end (whether it be a servlet or PHP script) WILL have to consist of more than one machine. That means, you'll have to either synchronize sessions between the application servers or store the session data in a central repository that all app servers have access to (through either a roll-your-own solution using PHP database calls or though RMI communication to an EJB layer that's handling persistent session data). Either way, the network call is a necessary burden to get your application to scale in any kind of meaningful way.
-
Fundamental Platform Differences and why PHP scales better
2003-10-17 13:41:13 anonymous2 [View]
In an ideal world, yes, it would be fantastic to always have an up-to-date session store right in the same machine as the code that's trying to access it. Unfortunately, in any kind of horizontally scaled solution, it's not always possible. If you are dealing with a large group of users, there will come a point where your HTTP front end (whether it be a servlet or PHP script) WILL have to consist of more than one machine. That means, you'll have to either synchronize sessions between the application servers or store the session data in a central repository that all app servers have access to (through either a roll-your-own solution using PHP database calls or though RMI communication to an EJB layer that's handling persistent session data). Either way, the network call is a necessary burden to get your application to scale in any kind of meaningful way. -
Fundamental Platform Differences and why PHP scales better
2003-10-18 02:50:10 anonymous2 [View]
"That means, you'll have to either synchronize sessions between the application servers or store the session data in a central repository that all app servers have access to[...]Either way, the network call is a necessary burden to get your application to scale in any kind of meaningful way."
True but, as you mention, synchronizing sessions between servers means the network calls are, to some extent, made outside of the user request cycle. Depends on the technology you're using.


