title: Using a ticket server to generate primary ids?
body: <p>I am building a distributed application on top of Java and Cassandra. To generate unique sequential 32bit &amp; 64 bit IDs, is an approach like using <a href="http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/" rel="nofollow">Flickr's ticket servers</a> to generate primary IDs, a good one? I am particularly excited about this as it can help me reduce the size of the IDs to 32 bits or 64 bits as required, which otherwise may go up to 128 bits with UUIDs. I do not want these IDs to be perfectly sequential, but increasing at least!</p>
  
  <p>Using a single database server may however introduce a single point of failure that was eliminated by Cassandra. However this may be OK for the initial stage of our application. Later we may introduce two servers to alleviate those problems.</p>
  
  <p>Does this sound like a good strategy? In short, we are mixing MYSQL and Cassandra in one application. I know, if mySQL is down for some reason then we can't go ahead with Cassandra alone.</p>
  
  <p>We have looked to other solutions like snowflake however it did not perfectly matched our requirements.</p>
  
  <p><strong>EDIT : I am seeking advice on whether using MySQL for generating unique primary IDs to key the data/ entities stored in Cassandra database is a good approach. What are the downsides, if any, of an approach like Flickr's Ticket servers?</strong> </p>