Auto-numbering of Gift Certificates, Invoices, and Reservations

You may have noticed that the numbers assigned to gift certificates, invoices, and reservations are not always the next number available. For example, you might only sell two gift certificates in a day but the second one is about 30 numbers higher than the first. 

The reason that rezStream Cloud numbers things in this way have to do with performance as well as preventing duplicates.

The system is running on true cloud technology meaning that you may be connected to any one of our front-end web servers at any time. What this means in terms of numbering is that when you set the next number (to 1 for example), basically the servers grab a chunk of 32 numbers (the first server gets 1-32, the second server gets 33-64, etc...), each server then knows that it's numbers are safe to use and nobody else will use those numbers. The number that gets automatically assigned to the gift certificate will be from one of those two blocks depending on which server you are on when the gift certificate is made.

We do this for performance reasons as requesting the numbers each time and making sure that the other servers know when each number has been used would require a lot of overhead (computing power and network traffic). This would mean that the rest of the system would take a performance hit and possibly result in a bad experience for you.

Doing it this way also reduces the chances of creating a duplicate number to almost nothing.