I have an existing SPA application where api calls from user browser are forwarded to application server hosted separately. My application server have all business logic and repository to connect to DB. Something like below :
we are thinking of merging application layer with rest api so that new design would look like :
Technically both design serves the purpose but I would like to know what are architecture decision points to choose one versus another and what are pros and cons if I have to consider one vs another.