473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Clustering and Session Management

We're running a fairly busy and complex e-commerce website. It's an
online retailer. We utilize MySQL for most of our site-based dynamic
data, and then we use Oracle to access inventory and place orders. We
have two seperate machines for database and web application
(reasonably powerful dual xeon 3ghz machines, 6gb ram each).

We're running Apache 1.3.28 with PHP 4.3.3, mod_ssl 2.8.15 and OpenSSL
0.9.6b. We are running MySQL 4.0.16 as our db and Oracle 8.0.5 as the
inventory.

We front the webserver with a Nortel Alteon AD3 load balancer and it's
currently configured for one webserver. The webserver talks to the
database on the back-end (via second network).

We have a second webserver in place but are unable to bring it into
load-balancing because of sessions. We use flat-file sessions and
regularly build 20,000+ each day (cleaned up after 24 hours). We ran
into performance issues using NFS to store the flat files between the
two machines, so we dropped down to one server.

The question is, what is out there to support distributed session
management? I have taken a look at msession but I can't seem to get it
to compile correctly on RedHat Enterprise ES v3. It also seems to want
to use PostgreSQL.

Does anyone have an opinion on which way we should go? I've thought
about using the database to store the sessions, but that would be a
write and read for every pageview.

We store session numbers via cookies, and I thought about using Cookie
persistance with our AD3's, but it seems like that might introduce
other problems in the event of a server going down, etc. I have also
thought about using client-based persistance (IP Address) but that
could possibly throw the load-balancing out of whack with
super-proxies (AOL, etc).

Anyone have any ideas? Are there any super-fast database products that
would be more suited to many small writes and reads?

Thanks,
Jeff
Jul 17 '05 #1
3 3565
"Jeff" <sp**@lightweb.net> wrote in message
news:f5**************************@posting.google.c om...
We're running a fairly busy and complex e-commerce website. It's an
online retailer. We utilize MySQL for most of our site-based dynamic
data, and then we use Oracle to access inventory and place orders. We
have two seperate machines for database and web application
(reasonably powerful dual xeon 3ghz machines, 6gb ram each).
...
....
Anyone have any ideas? Are there any super-fast database products that
would be more suited to many small writes and reads?

Thanks,
Jeff


The most simplest way is to have a user stay on the same webserver. name the
two servers www1 and www2, this way the entire session stays on one webhead.
(head web server)

But I do not know how your load balancer is working, is it really managing
load? checking the status of the servers cpu/mem etc? monitoring tcp
sessions?

But if you must have data flowing from multiple webheads for every
connection, then use a back end file server for the sessions, mount via NFS
or SAMBA.

BTW, it is best to use GigE on the backchannel.

One of my clients has a similar situation, 4 webheads, and one dual cpu,
raid session server, the webheads send/recieve their session info on the
backchanel to the session server, via http. So it is not simple save session
stuff. I wrote a distributed session management system for them.
--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #2
The project I'm working on is running on 30 load-balanced dual-xeon
Apaches. (I'm not aware of how the load balancing works.)

Sessions (we have around 2 million visits/day) are stored in MySql on 4
more of the dual-xeons. The custom session handling routine (using the
standard "session_set_save_handler()") decides which of the DB servers
to go to based on a modulo calculated from the session id. I haven't had
a chance to look at the exact algorithm for this, but it seems to
distribute load fairly evenly between the 4 servers, even if a user gets
his pages from all over the 30 apaches.

Hope this helps,

Jochen

Jul 17 '05 #3
What kind of overhead is there for storing sessions in a database? That's
question I've long thought about but never gotten around to answer.

In the same situation I'd have gone with the simple solution of putting the
session files in a shared folder.

Uzytkownik "Jochen Buennagel" <za*********@buennagel.com> napisal w
wiadomosci news:bu*************@news.t-online.com...
The project I'm working on is running on 30 load-balanced dual-xeon
Apaches. (I'm not aware of how the load balancing works.)

Sessions (we have around 2 million visits/day) are stored in MySql on 4
more of the dual-xeons. The custom session handling routine (using the
standard "session_set_save_handler()") decides which of the DB servers
to go to based on a modulo calculated from the session id. I haven't had
a chance to look at the exact algorithm for this, but it seems to
distribute load fairly evenly between the 4 servers, even if a user gets
his pages from all over the 30 apaches.

Hope this helps,

Jochen

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
3
by: Erik Johnson | last post by:
There are a lot of things about PHP I was not too keen on and hence why my company is primarily doing Python these days, but one thing I was quite impressed with was the ease with which it provided...
5
by: Abhilash.k.m | last post by:
This is regarding the session management using Out of proc session management(SQL SERVER). Among the samples below which one is better to set the session? 1. There are 20 session...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
13
by: James Hunter Ross | last post by:
We love the ASP.NET "Session" concept and make good use of it. But, getting close to deployment we find we lose sessions far too often, probably due to application restarts, etc. We hope to...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
5
by: rug | last post by:
Hello, I want to use a MySQL Heap table (server load isn't an issue) for session management considering that I use a shared server and don't want anyone who has access to /tmp to be able to read...
2
by: =?Utf-8?B?YW5vb3A=?= | last post by:
Hello, I am developing a Simple ASP Application with a Login page. I want to know how session ID can be generated after User has authenticated instead of generation along with the Login page...
5
by: knyghtfyre | last post by:
Hello, My company is developing a rather large application with .NET 2.0. We are expanding to a server farm and are in the process of converting our application to use an out-of-process session...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.