Hi Herve
Thanks for the detailed response, your answers have really helped clarify things in my mind.
The connection pooling blog post from Cihan is a pretty strong argument for using built-in federations if you have lots of shards, hopefully some of the other issues will be solved by the time we get to the number of shards he mentions!
From my perspective, here are the deal-breakers:
- Online split: If you currently can't split online this means your database goes down. My database is mission-critical, so this is not an option. The way I got round this issue during manual sharding was to bcp out the data while all apps that updated data
in that shard were offline. Luckily for me the mission-critical apps just read data, so this was okay. Once the data had been imported, I just switched the connectionstring of the read app, started the update apps with a new dynamic connectionstring and deleted
the data from the old shard slowly in the background.
- Support for copy database and import/export API: Every day we make a copy of the live database using "AS COPY OF" and then create a bacpac in blob storage of that copy using the Export REST API. I believe this is best practice for creating a transactionally
consistent backup that doesn't create problems with throttling on your primary database during the bacpac creation as the operation is happening on the copy. Can I do this with federations? Does database copy and the Export REST API support federations? If
not, could I "trick" these services into working by performing them on the federation members?
- Support for SSDT: Despite this being a new tool, I can't live my life without it. I use it to sync Schema and SPROCs between my manual federations. I understand it doesn't support federations either, but could I do the same trick as above? ie attach to
federation members separately?
Here are the important-to-haves:
- Renamable federation memebers: Now I understand that there are use cases where a ticketing company needs to spin up a 500 SQL Azure databases and maybe manual management of a federation that large is not practical, but surely there will be many companies
like mine where the shards are more "stable". I envisage adding shards when we add new clients and moderately rarely splitting existing shards. In this case it would be handy to be able to name the shard to make it easier to work with in tools like SSDT that
don't support federations?
- Geo-dispersed shards: We have clients both sides of the pond. Our shards reside on the closest datacentre to the client.
You mention that some tables can remain in the root database. Is this database special in any way? ie Can you do joins from a table in the root to a federation member table?
Also, when I do decide to start using federations is there an easy way to "convert" my shards into a federation?
Thanks very much for the answers so far, any more to the questions above would be much appreciated!
Cheers
David