0

I am using azure worker role to read and process the queue message.

It is working fine but sometimes the performance is very slow. It's not reading queue properly.

So queue message count starts to increase, so all functionality is getting delayed.

Web app details.

Main use of the app is tracking the vehicle. each vehicle contains device to send gps in every 15sec duration..So ill will get and push into the queue by web role..then reading and processing that message..

Sometimes worker role performance is very low.. takes 2 sec to read single message..

I cant say its happening by work load, because morning and evening trips are there..that time i have to process more details,like sending messages etc...but that time its working fine.. afternoon time no trip that time simply reading and pushing into azure table storage. Its not reading queue fastly , once or twice in a day its happening..queue messages counts increased more than 5000, then all data processing getting delayed..

How can I avoid this?

BALA G
  • 75
  • 10
  • 2
    Scale the number of instances up and down to meet your workload? If you think it's an issue with the code then you need to post the relevant parts and/or explain what it is doing. – Alex S Aug 11 '15 at 11:27
  • You've given no information about your app. We don't know if it's slowing down due to load... due to your process hitting external resources, etc. Please edit your question with more details. Without more details, the only two solutions are "scale up" to larger role instance size and "scale out" to more instances (and neither of those suggestions are backed up by any detail at this point). – David Makogon Aug 11 '15 at 12:00
  • If you are using an EventHub queue you could instead use Azure Stream Analytics to read the data off your queue. Instead of having to code the process you will only need to write an SQL like query to process your data. You can then also decide where you would like to move the data to, either blob, PowerBI, or SQL database – Dan Ciborowski - MSFT Aug 11 '15 at 22:27
  • @David Makogon my web app is vehicle monitoring..devices from the vehicle will send in every 15 secs..the messages will push into queue by web role..after that reading by worker role and processing and updating in table azure storage.. In my app morning and evening is load time..because morning and evening is trips..that time only analyzing gps data..other time just reading saving data..Sometimes working fine.even in loadtime.but sometime its not reading queue messages in normal time also.. – BALA G Aug 12 '15 at 02:43
  • @Alex S If it is a workload means it should not work ..but sometime its working fine ..sometime not working.. Even in workload time working fine..in normal time not reading queue properly.. – BALA G Aug 12 '15 at 02:49
  • @BalaMurugan - Please edit your question, instead of placing details in comments. – David Makogon Aug 12 '15 at 04:18
  • It's still hard to help with the issue with the amount of detail you are giving. So you are saying that the role can handle peak load OK and the problem begins when message volume is low? Maybe you could update your question to include what message volume is at low and high times so that the figure of 5000 has some reference. Is your role recycling? You say 2 seconds to read a message, is that 2 seconds to pick it up from the queue or does that include processing it? You say there are no trips in the afternoon so what are the messages at this time? What does the processing involve? As your... – Alex S Aug 12 '15 at 09:05
  • ... question stands there are too many unknown variables about what is happening for anybody to help. Maybe you could supply some [pseudocode](http://www.unf.edu/~broggio/cop2221/2221pseu.htm) of what your worker role does and identify in it where you think the delay in processing occurs. – Alex S Aug 12 '15 at 09:10

0 Answers0