As mentioned, with serverless instead of running your entire application from your own server, you're breaking up your application into smaller functions and running them over the internet. Each function is very limited in what it does, and so is faster and easier to create, test, and even change down the road.
Serverless applications can leverage the client's computing resources, the server, and even third-party BaaS (see below). The exact configuration is determined by the developer.
For example, the front end of an app could be client side, but it would connect to a serverless application code. Here's a very simplified example of how a serverless application could run:
- The client using the application performs and action
- A third-party BaaS authenticates the user
- The trigger notification proceeds to the server
- The server locates the right function and loads it into a container
- The code is executed, and a response object created
- The response is sent to the client
- The container terminates after a timeout
There are many different ways a serverless application can be structured, but they all share a decentralized approach: the client-side application is doing some of the work, as are the server-side functions and third party applications.