Sequences

21 February 2006 — Daniel

Internally our MXC software uses unique sequence numbers to store incoming and outgoing messages. For some reason, the convention we settled on was a 10 digit integer (in the database) and a 32 bit integer (in the applications), and while various instances of the software have been running for some years, we are yet to even come close to running out of numbers.

At one stage we pondered putting alerts on those sequences, to warn us in advance of running out. Then we checked and realised that even the busiest of our systems, which has been running for almost five years and has processed over 12 million messages, would take over 80 years to run out of numbers at the current rate.

Of course, this is the kind of head-in-the-sand Y2K-like dismissive attitude that may come back to bite sometime, particularly if (and we hope it does) the traffic rate climbs further.

The lesson here, of course, is to be well aware of the limits, and act appropriately and well in advance if they are expected to be breached. Expanding the IDs to larger field sizes is certainly something worth looking at, when that part of the system next gets revisited.

Comments are closed.