Q1. Replication can be done between two different serversor it can be done within the same server as well?
I understand that there wont be any purpose, but just for general query?
Q2. Does the election process starts after primary goes down, or it is done in advance while the primary server is up so as to save time when primary goes down,? During failover if any data that is about to be written in primary, how it gets written in secondary with 0 inconsistency, there must be some data loss?
Q3. If we have Server say 1, 2, 3, 4 where server 1 is primary, and if server 1 , 2 goes down then as per Tutorial, the remaining servers wont be able to elect a primary among themselves, so does that mean the availability fails even when we have two servers up and running, and why there cannot be election if server counts are even, in this case the remaining two server one must become P and another S and then when P fails the s must become P, why not?
So as per above explanation Suppose we have 5 server 1 2 3 4 5 and 1 being primary, if it goes down we are left with 4 servers and in this as well election cannot happen as two may vote for server 2 as primary and two may vote for server 3 as primary as per logic given in Tutorial?