1

I've a site which in some cases use Message Queue asynchronously.

The method which sends the message returns its id. Then I make an AJAX call to get the response for the message with the saved id.

This works great, but now the site is going to be on a cluster and there starts my problem. I can't ensure that the AJAX call will be recieved by the same server which sent the message. Is there any known solution to this problem? Any suggestions?

Thanks, Diego

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
Diego
  • 16,436
  • 26
  • 84
  • 136

2 Answers2

0

Clusters typically have one name and IP address combination, even though there is more than one node that makes up the cluster. If you use the clustered application's IP name or address, you should be directed to the active node of the cluster.

Bob Horn
  • 33,387
  • 34
  • 113
  • 219
0

three solutions come to my mind:

  1. Make client aware of server
  2. Dispatch the request on server based on client input
  3. Dispatch the request on server by remembering which request was processed earlier by which server

Sometime ago I developed a web application like this and I dispatched the request based on client input parameter, that's a better solution I think.

Jahan Zinedine
  • 14,616
  • 5
  • 46
  • 70