How to Organize a Database Table’s Keys for Scalability

Let's say I have shards that store proverbial invoices. Since each shard is a stand-alone db instance, it will have "invoices" table with auto_incremental PK. Each shard auto increments the PK value on its own and so values are not unique among shards. In such a case I cannot expose an invoice by its id. www.example.com/invoices/123 could return multiple invoices from multiple shards. Am I missing anything here?

The following post contains some helpful strategies for implementing a distributed primary keys.

Link: blog.maxindelicato.com: How to Organize a Database Table’s Keys for Scalability



Comments

No comments yet.

Add Yours

  • Author Avatar

    YOU


Comment Arrow



About Author

Larry

A certified PHP developer and architect living and working in Orange County California. Larry specializes in LAMP based platforms and focuses on a wide variety of leading edge web technologies including web service development, AJAX enabled applications as well as Flash based application development.