 Okay I am finally I heard some voice right so I know that this is this time it's a little bit hard for you to stay awake and focus I know that so let us make it more interactive for now basically at this moment my job is just to set a set to set a stage for my next speaker which is PENCATES which is going to talk about the group replication in detail at this moment I'm going I'm just going to get everyone on the same level first so guys any one of you have not been using MySQL before 1 2 3 4 okay alright so I guess now it's good for us to get you on the same level you know what is MySQL especially MySQL replication but you guys have been using database before right what is what are the database you're using? Postgres. Postgres is right so before right now it's basically replication the idea is to make it is to make a clone of your master right to make one of your master now there are two purpose two common purpose of making a clone first is for high reliability or let's say VR disaster recovery the second one is to for rich scalability now what is the what is what it means by rich scalability this scalability means that let's say you're let's say you have a system that needs 20,000 select per second but it only has 2,000 DML per second right insert update building now in this case if you put it if you if you hit first time everything into one single database level your database level will definitely most likely will die faster that's as unless you have a very powerful server now the idea here is that you have you will be directing all your DML into the master and then and then redirect all those all the selects into several slates because all these slates contain data right even though it's not it's not as up to date maybe a little bit late by few seconds but they contain most of the data by the way the people that have been using the application in post-credits not you yeah can you try you're learning about it okay all right so now let's let's take a look at the and some at some topologies what is the possible topologies that you can set up using a master application first it's of course the this is the laser okay am I okay at this one at the top is master and slave so you only have one slave right now you can also you can you can also develop to become to sleep now you have to sleep so that means you can actually redirect all the selects into to sleep now the next one is actually different layer slave so this this is some people call it some people call it waterfalls so at the back of your of the master you have to sleep and then at and then behind this must be behind this slave there's another slave means that this guy become the master of this guy right so this there is a this this kind of idea and this kind of method is actually deeply and heavily used in in in the in company like Facebook Twitter all these all these guys are using this very very heavily starting from 5.7 we have we make this topology possible this topology means multi-source replication you have a number of master and then and then and then it writes to the slave the slave it actually pull all the changes from multiple master and what is the use case of this use case of this yes reporting reporting different databases yes I'm sorry data reporting so basically let's say you have you have a business that have a few branches five branches all these branches have a master and then in your HQ you have the slave actually pulling all the data from this master and consolidate and you can run the reporting on it because we have a complete data from all five branches right now we have depth on top is a master master is it is it is possible to be used in my scale but we don't really we don't recommend it we don't actually support it correct me if I'm wrong by the way but yes I mean this is the support engineer recommend against writing to multiple at the same time exactly right because it's prone to problem we're from from my signal point of view it's it's not supported well I guess it's technically supported but technically yes if you do conflict yes that's the idea so yeah so the next one is that this is why the propagation comes in this is okay the next one is about circular application so it means to say that every one of them is a master and a slave of the other this doing replication in a circular manner right now on consistency level by default replication in my choice asynchronous synchronous means master will not care whatever happened to the slave you just accepting any transactions just don't care what is the slave responsibility is to pull any changes from the master there is asynchronous it is there is by design because we don't want to we don't want master performance to be impacted when it needs to update the the slave this is by design now of course because of some some some cases people might want to go for the semi synchronous replication why what is the semi synchronous replication is basically we make sure that when the procession comes into the master we'll make sure that these changes in the form of a log will be we will be pushed into the file system of the slave so that it means to say that it'll already there in the form of a log and is it is ready for the slave to pick it up and apply it that's why we call it semi synchronous you don't call it synchronous because there is still one one more stage that the slave needs before the database is updated now what is what is the use case for them is when is when when you at some point they are data integrity between the master and the slave is more important than your master performance okay reputation workflow so basically primary when it receive transaction it will save it first to the database the comet and then right to the binary log the bin lock here by the way this this laser is not okay number two is this writing to the bin lock and then the number three does the slave will be will be pulling will be pulling the bin lock to the slave file system and write it to the file system when it is written to the file system we call it relay log and then the the the slave threads is going to have to apply it and pull it from the file system and apply it in the database to make the data to make the changes applied into the slave I think if you need a master oh yeah never mind I mean I still need this glow yeah never mind it's okay okay um right automatic failover automatic failover in the replication as because as you can see some some of you actually using it for my skill for h a high ability or disaster recovery right so high ability and disaster recovery means that when the master is down you want you want this this the next the most up to date slave to be able to become the new master and the help the last the rest of the slave will be connecting this new master so how to do that because if you have if you have a number of slaves if you have to do it manually then you have to you have to spend quite a number of times first you have to detect that it is down and then you have to jump onto your system and then try to connect it one by one change master you have to check also which one is most up to date so this one this thing takes time so this this is why we actually create a script a fight on script in my skill in the part of the my skill utilities call it we call it myself bear over so this script is able to actually handle to make sure that it will capture the the the most up to date slave and then promote it to become the new master get the rest of the slave to connect to this guy as the new master everything is handled by the state make your job easier just just run just once great that's all at this moment I guess everyone more or less know the theory about the application in my skill right now we are coming to group application now all this while we have we have to know that that master is writeable and readable yes such late is only readable right now in group application we have we can write we can write and read to all the system to all the servers in the group application minimum group application is free service free service there is a there is a reason for that because we need majority for all this will be will be explained by so and the maximum number of service is nine nine service optimal number is optimal numbers depends on your workload but we always always always in or outnumbered because of the majority voting requirements now okay I'm not going to talk too much anymore because you don't have time I will end my my my slides here because everyone is on the same level now and run on medication I'm going to pass over to Venkatesh thank you very much