Imagine a simple service architecture setup: single server where I have one service acting as a REST API (PHP), another service for rendering frontend (nodejs), and maybe a database service.
They all communicate through localhost requests, so for example frontend gets data from API by calling http://localhost:{API PORT}/v1/products
. Now the request flow would be frontend -> rest api -> database -> rest api -> frontend -> response to client.
Is there a performance penalty when using this approach vs using one monolithic application, where everything is together? Or is it better to utilize something like RabbitMQ for this kind of setup?