I am using Spring-boot or Spring-Cloud Framework to develop a web application. The system will be mainly for processing HTTP Restful requests from client side, and then save them in to MySQL database.
But I plan to make it more expandable. It should be able to start more instance of each service and make the system can handle more incoming requests.
But I'm not sure that I am doing is right, could anyone come and help me check whether my current approach is reasonable, or raise any potential risks in my approach.
What I'm doing is:
Service A receives requests in its controller, then asynchronously write them into RocketMQ. RocketMQ is used for clipping the peak.
Service B then subscribe the RocketMQ topic Service A wrote into and cache the messages into Redis in format of list.
Service C starts up a daemon thread checking the message numbers in Redis. If the cache list size reaches a certain value, it will pull all the messages and save them into MySQL, then flush the cache in Redis.