1

I've two load-balanced IIS servers, and I need to share some information between them.

The information is not related to the user session, so I don't see how a session state provider could help here.

I cannot use the database (requirement), and apparently use shared files for synchronization is not good idea.

What may I use? Of course keeping it as simple as possible, I know I could run memcache or something fancy, but the only thing I need is create a unique number for both servers.

Cheers.

Community
  • 1
  • 1
vtortola
  • 34,709
  • 29
  • 161
  • 263

1 Answers1

3

A WCF service that they both have access to would be a suitable solution.

Why can't you use a database? (that is the more standard way)

Edit - if all you need is a unique value (notice I say value and not "number") then I would use a Guid - the chance of a collision is so small it's ridiculous and it means that you can avoid introducing an additional dependency.

Guid g = Guid.NewGuid();

Job done :)

Community
  • 1
  • 1
Nathan
  • 6,095
  • 2
  • 35
  • 61
  • Yes, I was thinking about that as well. It has to be a unique number, but shared in both servers, that is, both have to use the same unique number. – vtortola Jun 13 '11 at 16:45
  • If they need to be the same, a database really is the most sensible choice... transactional, high performance and well documented... why can't you use a database? – Nathan Jun 13 '11 at 18:19