473,626 Members | 3,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sharing sessions across servers

Hi,

I was wondering if some one would be able to help me with this. I am
trying to share a session across two servers and I seem to be
experiencing some problems. I was wondering if anybody has already
tried something like this before and hence be able to provide some
guidance in this regard. Any suggestions, pointers or redirections to
useful links is welcome.

Thanks in advance for your help,
Meghna
Jul 17 '05 #1
1 6215
> Hi,

I was wondering if some one would be able to help me with this. I am
trying to share a session across two servers and I seem to be
experiencing some problems. I was wondering if anybody has already
tried something like this before and hence be able to provide some
guidance in this regard. Any suggestions, pointers or redirections to
useful links is welcome.

Thanks in advance for your help,
Meghna

This is where I have tho most fun, working on sites that scale, mostly
across several servers. Some poeple would say use a back end database, and
some form of cookies. Well, this is good, probably a better way.

But, here are my quick solutions.

Either get a 3rd server, that sits behind both front end servers, and both
servers pull user data from it,
by maping a shared directory between the back end server and the two
servers,

server 1 and 2, have a directy, like this
/www/yourdomain/directory/_userdata

but it is actualy a directy on the 3rd server called something like this
/www/shared/_userdata

or

have one of the two servers store the data, then map a shared directory
between the two servers,
server 1 has a directory called
/www/yourdomain/directory/_userdata

and server 2 has a directory called
/www/yourdomain/directory/_userdata
but this directory is actualy a directory on server 1
now, after you have all that,

save a uniq filename as a cookie to the user, along with user id etc,
validation cookies, etc..

then when you need the psuedo session information, just load it off a file
with a simple

include("/www/yourdomain/directory/_userdata/filename")
if you go to http://gzen.myhq.info/snippetview.php?v=var-to-file.php I have
an example of how to save an array to file and read it back, its only a few
lines

--
Mike Bradley
http://gzen.myhq.info -- free online php tools

Jul 17 '05 #2

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

Similar topics

6
2246
by: Rob Meade | last post by:
Hi all, At work we have 2 servers in a cluster for our web apps. One problem we have experienced (along with many others!) - is that if a user is logged into one of the applications on server a for example and it goes offline or fails their session is lost also - even though the application becomes available on server b. I have heard that it is possible to either exchange the sessions between
4
2593
by: Daniel | last post by:
Hi I am having a problem sharing session between SSL and non-SSL asp.net pages I have F5 BigIP with sticky sessions working fine, but the problem is tha sticky session applies at the port level (80 vs. 443) so when a user goes t a SSL page I lose session vars because it's on another server on the farm When the user stays on the same server for both non-SSL and SSL the sessio is shared OK Has anyone come across this problem and are...
10
2208
by: Suresh | last post by:
how to share Session Sharing Across the domain
2
2742
by: Chris Fink | last post by:
What is the recommendation for sharing master pages across IIS Servers? In our corporation, we have many webservers in different environments (intranet, extranet, etc). I've done some searching, and it appears as though the solutions are focused only around one IIS instance, by installing the controls (master pages) in the GAC. This solution would require me to install the controls in more than 1 dozen servers each time.... I would think...
1
2277
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session) cookie is created to hold the session key for the user. This unique key is assigned as part of the business layer logon process, and never changes while the user is logged on. The call to the business component returns this unique key if the logon...
7
4392
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right now it he is not logged in on www2.mysite.com (both sites use the same state server). The reason for this seems to be that the user gets a new SessionId when he visits a new web server (www2.mysite.com for example). If there was a way to add a...
3
3982
by: Ben Holness | last post by:
Hi all, I have a php/mysql website where people can upload their own graphics for the buttons and background of pages on the website. This used to run on one server, but I have now been asked to set it up on multiple servers. The problem is that when someone uploads a file, how do I distribute it to all of the servers? Should I use php to send it to all of the servers once
11
4692
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access 2003. The max. number of clients is about 50 (concurrent users is estimated around 10). Whilst the Back End always lives on a server, I am not quite clear where the Front End should live. I have searched the web and find contradicting views.
9
7373
by: Gilles Ganault | last post by:
Hello Some data are common to all user sessions, and to improve performance/save resources, I'd like to share those data between all sessions, so that each user doesn't have to hit MySQL for the same data. I'd rather avoid writing those in a flat file, and keep stuff in RAM instead. Someone told me about cache servers like MemCacheD. I was also given the hints of writing in OO (public class variables) or using
0
8269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8512
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.