Understanding Serverless App Architecture with Doodles

Divyanshu Kumar
codeburst
Published in
3 min readFeb 18, 2019

--

Serverless applications are internet based application/system which do not use a dedicated server but instead use third party services for authentication, cloud functionality and data storage.

A traditional application architecture looks like:

A traditional architecture includes various dedicated server driven or stored functionalities including user authentication, database access and business logic.

Now, when this architecture is made serverless, it looks like following:

Let me walk you through a few milestones of it:

  1. Third party Authentication: This includes the authentication of user using the third party services like OAuth, Social Login(including Google Login, Facebook Login, etc), this helps a lot of time and effort of developers coding the authentication logic.
  2. Function as a Service (Faas):

Traditional / Ordinary system have a dedicated server which listens for client requests and responds to them accordingly.

But in a FaaS system, the cloud functions play a vital role, more than 100 parallel requests are processed by the vendor and most importantly no cluster or VM management is required by the user at all and all underlying resource provisioning and allocation are done by the vendor.

Examples Include Firebase Cloud Functions, AWS Lambda etc.

3. Cloud Database: This includes using cloud databases for data storage like Firebase, IBM Cloudant etc.

A few advantages of Serverless Architecture:

  1. Easier Horizontal Scalability: as I told earlier, the cloud functions are managed by the vendor which allow high parallel execution with low development cost.
  2. A fully serverless architecture requires zero system administration.
  3. Reduced cost: It reduces the cost of deployment and development both, since it does not include the cost of a dedicated server and a dedicated server logic. We only pay for the amount of computational power we use.
  4. Most of the business logic is incorporated in App only which results in faster computations and response time.

For example we have inconsistent traffic on our app, like we had only 4 requests for a 2–3 months and then a very high requests for next month. In traditional method we have to pay for 4 months for dedicated server, whereas in Serverless architecture we only pay for the computational time and not for the idle time.

But nothing comes without disadvantages/limitations, a few of them are:

  1. Security Issues: It may cause security concerns when the authentication and data control lies with the vendor, hence a few people might not feel it authentic.
  2. Vendor Block in: It may happen like, a vendor may become a necessity for the application and hence it may lead to increased cost and demands of vendor.
  3. Absence of Local testing and debugging: Testing and debugging may be a bit difficult with cloud functions, due to inability to deploy them locally.

In conclusion serverless architecture involves its own advantages and disadvantages, so it is worth an attempt. Do give it a try for at least an experimental project and do let me know your experience.

Happy Coding

Divyanshu Kumar

--

--