14. Scale Back and Scale Up What? Scale Back – remove/archive unused data. Scale Up – add more power(RAM,CPU) , disks. When? When you can. Your database get benefits from that. Changes in application: No
15. Partitioning What? Partitioning – split tables to logical parts by same criteria's. When? You have big table(s) which utilize the biggest part of traffic. Your queries ask only parts of information. How? Database do it work for you clearly for your appplication. Changes in application: No Example: You can have millions commentaries but in 99% you show only latest of them.
16. Replications What? Copying(sync or async) data from “master” server – to “slaves”(or other Master). The idea – read from slave, write to master. When? You much more “read” traffic then “write”. How? Databases have tools/solutions for replication. Changes in application: Not big
17. Sharding What? Split database into many smaller databases. There are: Vertical sharding Horizontal sharding
18. Vertical sharding What? Split database into many database(servers) by functionality When? You have tables which functionalities do not cross. How? You will split them manually. Changes in application: Not so big Lacks No more “JOINS” between these tables Example: Commentaries table utilize 90% traffics. Shard it vertically and move the tables to separate server.
19. Horizontal sharding What? Split big table into many servers When? You have huge table and it too big for one server. How? You will split them manually. Changes in application: A lot Lacks No more “JOINS” between this table and other. No more ‘dumb’ queries for the table. Example: You have billions users. Split the table into few servers. Each server will contains same table but with different data.