I'm struggling to figure out how to scale any web application that allows the user to log in and depends on which user must log in to perform any action.
For example, I have a web application that allows a user to log in, edit the users address book, send messages to other users, and receive messages from users.
Some recommendations I received are to split my application into services using verbs. Therefore, I will have an address book editing service, a message sending service, a message receiving service, and an authentication service. All of them will be individually scaled horizontally and will not share data. That would be ideal, only they should share the data - the user who is currently logged in. I can not conceptually understand how this will work? Should I just send the user ID between the services and it will be implicit, is this the user who is logged in? What if I want to save a session state with information about what the user is doing now?
source share