Stage #eh4
I noticed that we send the port that the replica is listening on but I was wondering how that is useful to the master if we dont have the host of the replica.
Stage #eh4
I noticed that we send the port that the replica is listening on but I was wondering how that is useful to the master if we dont have the host of the replica.
Hi @shreyasganesh0, you can retrieve the host and port of clients or replicas this way:
async def client_req_resp(self, reader, writer) -> None:
client_host, client_port = writer.get_extra_info('peername')
Thanks but I more meant it as a question about why the replica sends the port number over in the replconf message
To be honest, I wasn’t entirely sure, so here’s what I did to find out:
redis
repo. It’s saved as slave_listening_port
.Ah that makes sense you live and you learn thanks for looking it up!
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.