How good is Scheduling Messages with RabbitMQ (rabbitmq_delayed_message_exchange) for production usage - rabbitmq

Currently, we are planning to generate threshold of 20K notifications per minute and add delay to fetch notification status at few intervals like 2 mins, 5 mins, 1 hour and then 1 day if the status isn't final.
I have done POC with
https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq/
it looks good but wanted to know real-time stats or any other suggestion before going live.

Related

How can i do Stress/Performance Testing in jmeter?

I Want to go for stress testing to start with the anticipated number of users (or just from 1 virtual user) and gradually increase the load such as for 10 threads, 20 threads, …. 100 threads until response time starts exceeding the acceptable value or errors start occurring.But For all this test run should i increases the Ramp-up Period(Seconds) or it will remain the same for all test?
Picture is given below:
Apparently, the Ramp-up time shouldn't be the same for all of your tests. You have to set the Ramp-up period accordingly.
Ramp up is the time in which all the users arrive on your tested application server.
You can check this thread also: How should I calculate Ramp-up time in Jmeter
As per JMeter documentation:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.
So if you don't have a better idea - go for the ramp-up period in seconds equal to the number of users.
The point of ramp-up is increasing the load gradually so will be able to correlate increasing load with other performance metrics for websites like response time, throughput, number of server hits per second, number of errors per second, etc.
See JMeter Glossary for the metrics which are stored by JMeter explained

Best practice for getRefreshedUserItems

On the data extracts page Yodlee describes best practices for using getRefreshedUserItems but I think there are a few more details there that should be shared:
Is the 1 minute recommendation just in place to mitigate having to deal with large amounts of returned data? Is it within reason to only perform the polling for refreshed accounts every 5 minutes instead?
Say I do set up my process to retrieve refreshed items every 5 minutes as previously described, but my process fails to run during one of the iterations. If I leave it alone does that mean for 24 hours there are a few items I will have failed to pick up the refresh for? If so, how are others handling this? Recording a record of the timestamp of each successful communication with getRefreshedUserItems or perhaps iterating their local cache of Financial institutions that haven't been synced in more than 24 hours and retrieving updates for those as a one off communication? Or something else?
The main reason for keeping the limit as 1 minute is because of high number of refreshes, at current point of time you may not have high number of users but in future it may become higher.
Coming to your question about handling failure use cases- Say one of your job fails to fetch the items for that particular instance(passed duration in request), then you can have records of all such requests(which failed to get those items) and you can have a follow up job every hour which will trigger request for all the failed durations. This way you won't missed any items and keep data in sync with Yodlee.

celery takes too long time to write result to rabbitmq

Recently, I started celery beat to run a task periodically. The task will take about 2 minutes. The beat interval is 3 minutes. The back end use rabbitmq.
However, the totally elapsed time of a task become nearly 20 minutes. It looks so strange! After some work, I found that the extra time consumed by sending task result to rabbitmq. It is awesome! Why?
And the celery worker will use another 5 or 7 minutes to receive the next task. I do not know what the worker are doing in this period.
Anyone could help to explain them?

Finding an applications scalibility point using JMeter

I am trying to find an applications scalibility point using JMeter. I define the scalability point as "The minimum number of concurrent users from which any increase no longer increases the Throughput per second".
I am using the following technique. Schedule my load test to run for an hour, starting a new thread sending SOAP/XML-RPC Requests every 30 seconds. I do this by setting my number of threads to 120 and my ramp up period to 3600 seconds.
Then looking at my TOTAL rows Throughput in my Summary Report Listener. A new row (thread) is added every 30 seconds, the total throughput number rises until it plateaus at about 123 requests per second after 80 of the threads are active in my case. It then slowly drops the throughput number to 120 per second as the last 20 threads are added. I then conclude that my applications scalability point is 123 requests per second with 80 active users.
My question, is this a valid way to find an application scalibility point or is there different technique that I should be trying?
From a technical perspective what you're doing does answer your question regarding one specific user scenario, though I think you might be missing the big picture.
First of all keep in mind that the actual HTTP request you're sending and ramp up times can often impact what you call a scalability point. Are your requests hitting a cache? Are they not random enough? Are they too random? Do they represent real world requests? is 30 seconds going to give you the same results as 20 seconds or 10 seconds?
From my personal experience it's MUCH easier and more intuitive to look at graphs when trying to analyze app performance. It's not just a question of raw numbers but also looking and trends and rates of change.
For example here is an example testing the ghost.org blogging platofom using JMeter with an interactive JMeter results graph.
http://blazemeter.com/blog/ghost-performance-benchmark

complex crons for shared hosting

I have an app which displays the latest scores in football games. Every 15 minutes, a cron runs to check if a game has started. If it has, another cron needs to start which runs every 30 seconds for the next 2 hours (this cron queries an API to get latest incidents for a game). Im on shared hosting with Plesk and there is no ssh access. Plesk appears to just offer very simple cron management to schedule the execution of a script every x minutes. What is the best solution for me?
Have the 30 seconds cron running every 30 seconds (also in times where there is no game) and check inside the script (which is run by this cron) if you are inside your 2 hour timeframe - if yes do the work else end the script