[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Clustering Minivend-Success!
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Jimmy Eaton (jeaton@silverclicks.com):
> We have set up a cluster of two pawn servers, a Mysql database server and a
> director. A total of 4 machines. It took about two days to get it working.
> As usual the main problem was permissions.
>
Congratulations on finding this; that was one of the objects of Minivend
4, but I had not provided any pointers on how to get it done.
> We still have bugs and a session will sometimes get lost. Also there seems
> to some problem with searches on the pawns but which are no problem on a
> one-machine setup.
Make sure you share your "tmp" directory. The search paging is saved
there.
>
> We have the session directory as an nfs directory on our data server and
> shared with our pawns.
>
> Some of the problems we encountered were:
> Make sure that date and time are the same on all machines. You will get an
> error if a session tries to get a creation date and time in the past as to
> your different machines.
>
Yup, I have hit this one too. The symptom is that when you hit the machine
with the past date, the session will expire and you will get a new session.
It is also possible to cluster sessions using SQL as the session
mechanism. I don't know what happened to MySQL BLOB write times since I first
wrote SessionDB about two years ago, but it seems quite efficient now.
I didn't make much of it to begin with as performance was bad. Probably
the fault was in my code, but there may be other reasons.
Start DEBUG at Sun Apr 23 06:26:50 2000
Using file-based sessions....
Vend::Server:debug: end connection: 0.32 0.06 0 0
Vend::Server:debug: end connection: 0.57 0.07 0 0
Start DEBUG at Sun Apr 23 06:27:51 2000
Using DBI/mysql sessions....
Vend::Server:debug: end connection: 0.4 0.11 0 0
Vend::Server:debug: end connection: 0.48 0.08 0 0
(The key numbers are the second one, the "system" time. MV shouldn't
perform much different otherwise....)
You will definitely want to have the Storable module.
WARNING: This capability is *not tested under battlefield conditions*. I
have never used it in a production system, so be careful.
To use DBI sessions, you can include a file like:
Database session session.txt __SQLDSN__
#ifdef SQLUSER
Database session USER __SQLUSER__
#endif
#ifdef SQLPASS
Database session PASS __SQLPASS__
#endif
Database session COLUMN_DEF "code=char(64) NOT NULL PRIMARY KEY"
Database session COLUMN_DEF "session=blob"
Database session COLUMN_DEF "sessionlock=CHAR(64) DEFAULT '' NOT NULL"
SessionDB session
SessionType DBI
(of course products/session.txt should exist and have the field names
"code", "session", and "sessionlock")
Expiration will be hard, possibly; I don't know if the expiration program
will even work.
--
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>
In character, in manners, in style, in all things, the supreme excellence
is simplicity. -- Longfellow
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list