distributed system - Fault tolerance through replication of SQL databases -


suppose middle tier servers replicated 3 way , backend database (mysql, postgresql, etc...) replicated 3 way. user request ends creating user data in middle tier servers , commit backend database in way resilient failures.

a candidate attempt solution, example, if send data 1 sql database , have replicate data other databases if 1 sql database has harddrive crash before can replicate data, data lost.

what best practice solution fault tolerance used in actual real world.

many databases have option clustering, out-of-the-box solution requirement sketch. i'd recommend using out-of-the-box solution, rather rolling own - there nasty problems kind of solution don't want solve on own.

a classic example primary keys - if have 3 back-end servers receive "create new record in table x" instruction middleware servers, , want replicate data, have ensure there no clashes in primary key. if use integers primary key data type, have make sure db server 1 doesn't create customer record id 1 if id used record on server 2. it's not impossible challenge - burn few weeks building , testing solution.

the other thing need consider how long application can off-line in case of database outage - no outage @ all, minutes, hours, or days. shorter outage window, more expensive , complex clustering solution needs be.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -