I am Using Apache Ignite 2.8.0. I have developed small dash board that is used to monitor the performance of Ignite. Now my problem is finding the number of servers. first i have find the total number of nodes(in node variable), then
total_servers = 0
port = 8080
for j in range(0,node + 1):
if(persistence == True):
url_cache = "http://localhost:" + str(port) + "/ignite?cmd=top&sessionToken=" +sessionToken
else:
url_cache = "http://localhost:" + str(port) + "/ignite?cmd=top"
try:
print(j)
try:
res = requests.get(url = url_cache)
print(res.status_code)
if(res.status_code == 200):
total_servers = total_servers + 1
except:
pass
except:
pass
port = port + 1
But it will take much time, i don't want that. is there any simple way to finding the number of servers running in Apache Ignite by using REST API http request?