none
Message ordering in load balanced environment

    Question

  • Hello

    Is it possible to have message ordering when using load balanced workload.

    Simplistic scenario would be:

    2 IIS , each server installed with Sql Service Broker

    1 common storage could be sql server / hadoop.

    Is it possible to have the messages ordered when they are consumed by the common storage?

    We are talking around 10000 messages / second, so it is impossible to use a date time.

    Sunday, June 16, 2013 5:56 PM

Answers

  • I think the answer depends on exactly what you mean by "consumed by common storage".  I assume there is a application that reads messages from the multiple Service Broker queues and writes these to a data store.  It would be the responsibility of that consuming application to assign an incremental value needed to order messages.  If you have multiple consumer application threads or instances, you'll need a shared cache to assign the incremental values.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Marked as answer by Janus007 Sunday, June 16, 2013 7:44 PM
    Sunday, June 16, 2013 6:47 PM

All replies

  • I think the answer depends on exactly what you mean by "consumed by common storage".  I assume there is a application that reads messages from the multiple Service Broker queues and writes these to a data store.  It would be the responsibility of that consuming application to assign an incremental value needed to order messages.  If you have multiple consumer application threads or instances, you'll need a shared cache to assign the incremental values.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    • Marked as answer by Janus007 Sunday, June 16, 2013 7:44 PM
    Sunday, June 16, 2013 6:47 PM
  • Hi Dan

    Yes a common data store would in this scenario be an application the reads from both IIS-servers.

    I think you answered my question with the shared cache to get an incremental value. 

    Thank you for now :)

    Sunday, June 16, 2013 7:44 PM