I have two microservices, one Flask (python) and one Spring (java), they currently share a database. The Flask microservice handles processing json files (~40mb) for each user (could be 100's or 1000's of users per day) and adds the processed data to a Postgres DB that is shared with the Spring microservice. The Spring microservice is an api that allows users to retrieve data from the DB. The users dont have access to POST, PUT or DELETE endpoints.
I understand that in microservice architecture it is better to have each microservice have its own database. However, these two microservices are heavily linked with the database.
I have thought about introducing a message queue between the services so the Flask service will just send the processed json to a queue and the Spring service will handle the messages from the queue and add the processed data to a database.
I'm worried about overloading the Spring microservice with API requests and adding data to the DB. I understand however that this would be better for scaleability in a Kubernetes system.
Any opinions on how I should handle this? Am I missing an alternative approach that could work better ?