wcf - Update individual instance of Azure Cloud Service -


i have cloud service hosted out in azure. due amount of data uses, have hourly process tells service cache data memory. update cache, use exposed method called "refreshdata" invoke on scheduled task on local server.

recently updated cloud service run on 2 instances (meaning running on 1 vm, running on 2).

what im noticing our data no longer automatically refreshing current data. seems happening here is:

  1. a scheduled task run command executable triggered @ top of hour on local server
  2. the exe calls out http://mycloudservice.cloudapp.net/service.svc, gets response, , kicks off refreshdata method
  3. the instance received refresh request "random", meaning 1 of 2 instances told refresh data. therefore, user using our service gets current data, can few hours stale.

so if have cloud service responds ip, there 2 instances running "behind it" individual ip's, how can invoke request , ensure both getting updated needed?

ps - i'm aware azure has "load balancer" tool available, if needed im comfortable using 1 instance primary , have second instance work failover, if thats plausable option here?

you have few options:

  1. why cloud services not responsible refreshing own data on schedule? why have told external? using scheduled task or timer inside role instances easiest , reliable method.
  2. use instanceinputendpoint each instance gets unique port number. scheduled task make 2 calls, 1 http://mycloudservice.cloudapp.net:81/service.svc , 1 http://mycloudservice.cloudapp.net:82/service.svc.
  3. setup instance level public ip address (http://azure.microsoft.com/blog/2014/10/22/instance-level-public-ip-address/). scheduled task make 2 calls, 1 http://{instanceip1}/service.svc, , 1 http://{instanceip2}/service.svc.
  4. use same configuration using now, random instance behind load balancer gets refresh command, , internally instance communicate other instance(s) using internalendpoints.

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -