[ic] Cluster and/or load balancing question

John Beima interchange-users@icdevgroup.org
Tue Jul 16 13:06:01 2002


Quoting Dan Browning <dbml@kavod.com>:

> At 11:02 AM 7/13/2002 -0700, you wrote:
> >At 11:41 AM 7/13/2002 -0600, you wrote:
> >>Quoting Dan Browning <dbml@kavod.com>:
> >> > >I'd think NFS would cost you more performance in the above setup than
> it
> >> > >would be worth vs more beef for handling session files.
> >> >
> >> > We use MySQL for sessions, and it seems really fast.
> >>
> >>
> >>Dan, have you thought of posting how to use MySQL for sessions instead of
> the
> >>traditional method? That alone would help many people with clustering
> issues.
> >>Getting the sessions off the hard drive of one machine and into an SQL 
> >>server is
> >>most peoples breaking point.
> >>
> >>I had spoken with Mike about this a long time ago...
> >>
> >>He mentioned his method was to have an Apache server up front. It would 
> >>take the
> >>http requests and hand off new requests to a session server. That server 
> >>would
> >>issue the session number. Then the client was handed back and forth 
> >>between all
> >>the Interchange servers, since they all shared a common session database.
> You
> >>just needed to go to the main session server first. Then, if I recall 
> >>correctly,
> >>he had a MySQL server as well. Depending on the needs.
> >>
> >>So to sum it up. One Apache server, one Interchange initial session
> server,
> >>several Interchange servers, and one MySQL server.
> >>
> >>With that model, if you stepped it up to say 2 MySQL servers. One for 
> >>sessions
> >>and one for the Interchange tables, you could have a nice little boost as
> 
> >>well.
> >>Again the only thing would be to publish how to use MySQL for the sessions
> as
> >>opposed to the default methods.
> >
> >Consider it done (once I get back from Kentucky, that is).
> 
> A very humble beginning for the "Interchange Clustering HOWTO" is up at:
> 
> http://www.icdevgroup.org/~danb/
> 
> Please offer feedback (including how setting up MySQL sessions goes for
> you).
> 


G'Day Dan,

I found a few little things that may need to be clarified a bit...
You definitions should read more like this:


Variable        MYSQL_SESSIONS_YES      1
Variable        SESSION_DSN             dbi:mysql:sessionfiles:mysql_hostname
Variable        SESSION_USER             dbi:mysql:sessionfiles:mysql_hostname
Variable        SESSION_PASS             dbi:mysql:sessionfiles:mysql_hostname

ifdef MYSQL_SESSIONS_YES
Message Enabling MySQL-based sessions...
SessionType DBI
Database  session  session.txt  __SESSION_DSN__
Database  session  USER         __SESSION_USER__
Database  session  PASS         __SESSION_PASS__
Database  session  COLUMN_DEF   "code=varchar(64) NOT NULL PRIMARY KEY"
Database  session  COLUMN_DEF   "session=blob"
Database  session  COLUMN_DEF   "sessionlock=VARCHAR(64) DEFAULT ''"
Database  session  COLUMN_DEF   "last_accessed=TIMESTAMP(14)"
SessionDB   session
Message ...Done
endif

It has always been my understanding, if a field is defined as a primary key,
then it is indexed, so you don't need the index line. Also if the first column
is named code, Interchange defaults to using it as the key, so you don't need
that line either.


John Beima
jbeima@palb.com, support@alocalagent.com, and support@alocalchurch.com

P.A.L.B. Systems - Phone: (780)451-1086 - Fax: (780)447-4760
11639-122 Street, Edmonton, Alberta, Canada, T5M 0B6

Affordable Web Pages - Phone: (888)932-9990 - Fax: (256)351-7297
2713B Spring Place SW, Decatur, Alabama, United States, 35603


> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | Dan Browning, Kavod Technologies <db@kavod.com>
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "It's not Camelot, but it's not Cleveland, either."
>                  -- Kevin White, mayor of Boston
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>