Server VS Serverless Computing

Server VS Serverless Computing

When you run any project on your computer you probably are using an IDE or running code from your terminal. Your code uses available computing power on your system to run the application.?

Every piece of code you see online is running on some machine or server. These machines, are usually various cloud services such as EC2, Containers, Serverless systems, etc.?

There are two main ways you can do this-

  1. Is by having an instance setup with needed specifications, such as x GB ram, y storage space, and so on
  2. Or use a serverless service (like AWS lambda) to run the code. ?

First, let's understand the traditional method:

Instances such as EC2 help you build an entire ecosystem from the ground up, including OS, RAM, storage, no of cores, GPU, etc. catering to the task you wish to solve. While working with EC2 you are required to manage infrastructure.

Using instances is best suitable for -

  1. When the code needs to run for a long duration
  2. When you need to create a file management system
  3. Where the code would always reside,?
  4. When you need a large amount of physical storage
  5. When you would want to run multiple jobs at the same time

Real-world applications for instance:

  1. Building SQL tables, loading data into them, or taking backups (could run for hours)
  2. Running python DS scripts where you would need to use RAM to perform operations (could need GBs worth of space or GPUs).
  3. If you need to save files, as a part of physical storage such as CSVs, excel, etc.

AWS will charge you for every second the instance is up and running, not how much you are actually using. They could be an overhead if someone wants to execute small functions, are need to use the compute power for a few seconds only. ?

On the other hand, Lambda acts as a serverless system. It helps developers to run and execute the code’s response to events without building any infrastructure. Lambda is usually used when the task is self-contained. Unlike EC2, you only pay for the computing time you used.?

Using Lambda is best suitable for -?

  1. In my personal opinion, lambda is the best way to get started with understanding how to build a system. A system compromises of mainly three elements-?1. A gateway service 2. A computing service 3. A database. Lambda helps you connect to the gateway and database in a simple and easy manner.?
  2. When you are working with a quick response time between events.?
  3. Performing ETLs for small-sized data files
  4. When you prefer automatic scaling since you do not need to manage infrastructure.?

Real-World Application:

  1. The most common and widely used application of lambda is the deployment of APIs. APIs are a constant point of communication between the user and his data, therefore users frequently need to read and write large amounts of data.?
  2. Processing files uploaded to S3.?

Major Drawbacks:

  1. The maximum size of the deployment package allowed is 50MB
  2. The maximum execution time allowed is 15 mins.
  3. Memory is limited between 128 MB and 10,240 MB.

Hope this article helped you get started with understanding server vs serverless computing.

Note: This is just one point of view, there are many other ways to look at this topic. Please consider it as a point of reference. The technical information may change or could be partial. Please do your research and go through the documentation while developing the code.

Happy Coding :)?

要查看或添加评论,请登录

Yash Shirodkar的更多文章

  • Creating your first API (with code)

    Creating your first API (with code)

    API: Application Program Interface allows you to communicate with an application. Every link you see is a string that…

  • Pursuit of "your" Happiness.

    Pursuit of "your" Happiness.

    It's motivating to hear about someone who overcame adversity to achieve their goals. On a subconscious level though…

    7 条评论
  • 6 months of working full time!

    6 months of working full time!

    It's been 6 months since I started working full-time as a data engineer. The first job is always overwhelming.

    2 条评论
  • Github Tutorial 2: Committing specific files, Rollbacks, Merge Conflicts.

    Github Tutorial 2: Committing specific files, Rollbacks, Merge Conflicts.

    In the previous tutorial, we focused on understanding the basic fundamentals of Git. Git checkout, pull, commit, push.

  • This is how I work.

    This is how I work.

    I do not have 3 display screens or a 180-degree curve monitor to work on, but I do use an external display, it helps. I…

    4 条评论
  • I WAS THE TARGET FOR A JOB SCAM. (PLEASE READ)

    I WAS THE TARGET FOR A JOB SCAM. (PLEASE READ)

    As a master’s student at NYU who will be graduating soon, I have been applying for many jobs in various fields such as…

    37 条评论

社区洞察

其他会员也浏览了