{Event}  [LAST CALL] Limited space available for MongoDB.local NYC on June 22. Save 50% with code BANNER50! Learn more >

What is serverless computing?


Serverless computing is a simpler way to write and run computer programs.

Normally when programmers write code, they do the following things:

  • Write the code.
  • Compile the code into an executable form.
  • Install the executable code on a computer, aka a server.
  • Set up the server to start the program at the right time so it can run and do its job.
  • Monitor the server to make sure the program is running and performing properly, making changes as needed.

In serverless computing, the process is simpler, programmers work as follows:

  • Write the code.
  • Load the code into the serverless platform.
  • Monitor that the program is working properly.

    The programmer never thinks about the computer that is running the code. The serverless platform takes care of all of that.

Better yet, if the load on the serverless program starts to increase, the programmer never has to think about that either. The serverless platform automatically adds more resources to handle the traffic.

Here are some of the well-known serverless platforms:

  • Atlas App Services
  • AWS Lambda
  • Microsoft Azure Functions
  • Google App Engine
  • Google Cloud Functions
  • IBM Open Whisk
  • Red Hat Openshift Cloud Functions

Why does serverless computing matter?

Serverless computing makes programming easier, but all the serverless platforms are intended to write a certain type of programs.

For example, AWS Lambda has functions and events that are deeply connected to the Amazon Web Services cloud environment. When something happens to a certain element of AWS, such as creating an S3 object in a certain directory, an AWS Lambda function can be called.

It turns out that many serverless platforms are designed to have events trigger the execution of serverless programs. For this reason, serverless programming is associated with event-driven architecture.

Atlas App Services is a serverless platform designed to support mobile development. Programmers can store data in a database on the server but also replicate data to mobile devices. Events can be triggered along the way that allow the work of an application to get done.

So, the biggest impact of serverless programming so far is to allow many functions of larger platforms like public clouds or databases to work more intelligently.

Right now many different serverless environments are being developed for many other purposes, so in the future serverless programming may be important for other reasons.

What is the benefit of serverless computing?

The biggest benefit of serverless programming is that the programmer just has to focus on the code.

In addition, most of the serverless platforms allow large complex systems to work together in more intelligent ways.

Some people have criticized serverless computing because serverless programs only run on one platform. They are not portable.

Why is it called serverless?

There are servers inside the serverless platform. But the programmer never has to think about them or manage them. That’s why this type of programming is called serverless.

How does serverless computing work?

Serverless programming works by creating an environment in which a program can run and do some type of task.

When a serverless program runs after being triggered by an event, the program has access to all sorts of information.

The program could have access to many things, including:

  • Information about the event that triggered it
  • The state of other objects in the platform
  • Information stored in databases or file systems
  • APIs to get information from or to control other services
  • APIs to trigger other serverless programs

The work done by the serverless program must fit into what the platform intends. Serverless programming is not about general-purpose programming but it is focused on creating a certain type of program for a certain type of work.

Start Building Serverless with MongoDB

Sign up for the cloud for free and use Atlas App Services with MongoDB Atlas. No credit card required.