How does the ETCD elector land with the combination?

Hello, everyone. Let me ask you a question

.

there is a Java service that starts 5 nodes to be highly available
requirement: only one service can be valid at a time
solution:
1 deploy ETCD campaign leader on each Java node
2 when all five nodes receive tasks at the same time, check whether the ETCD of their own nodes is leader, or return, otherwise reject
question:
is the above solution reasonable? If reasonable, how does the client know who the current leader is? If it is not reasonable, then how should it be better?

Feb.24,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c6b3-2c32b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c6b3-2c32b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?