DEV Community

Aviral Agarwal
Aviral Agarwal

Posted on

How to ensure that two separate copies of same file on client and server side always be in sync?

Actually I have made a dns server in python using dnslib. The dns server first checks for the domain in its own dictionary ,if domain is found it returns the IP Address, if it is not found it fetches the ip address from an external dns.

I have also built a portal using which people can register their own domains with the dns server.
For this the domain and ip address are entered into the copy of the dictionary which is with the dns server.

Now using a TCP connection I am thinking of sending the changes made in the dictionary with the portal to the dictionary with the dns server.

But I am concerned that if for some time the data from client dictionary can't reach data to host dictionary then the two would be left async.

What can be the most efficient way to tackle this problem?

Top comments (0)