from our blog

HubSpot Update: Serverless Functions

Posted by Simranjeet Singh

HubSpot, Development

A server is a dedicated machine that approves server requests on behalf of clients. Clients could be a dedicated desktop computer, laptops, or workstations. A server is a centralized computer where multiple clients connect to over the internet or a LAN (Local Area Network). And, they connect to a server for a specific service. 

For example, a service from a server could be to retrieve information from a website, to access data, or an email among other things. 

 

You can manage all three functions of web, database, and email on a single server or three different servers. Larger organizations use a separate server for each service kind as large organizations have heavy traffic and functionalities requests on a daily basis. Each server managing a single service request type performs well. The organizations pay for three servers. 

 

Smaller organizations use a single server for all the services combined because they are cost-effective. They don’t have as many requests from a server as compared to larger organizations so one server can manage all the requests. 

You can even set up a server in your home space as well. 

 

For example, if you have 5 desktops in your home, you can turn one desktop as a file server and connect all four desktops with that one desktop. That will be now a file server. The server computer will have those files in a shared folder and other computers can connect to it to access those files. Or you can even treat your desktop computer as a web server. A network engineer can help you do that. 

 

Generally, we buy hosting/server services from the providers. In a typical server plan, you get something like this. 

  • 100 GB storage 
  • Unmetered or metered bandwidth 
  • 1 website or multiple website options 
  • A dedicated email server 
  • Free SSL 

And other perks depending on the hosting provider’s plans. In the starting days, everything goes well because the traffic is limited, the data is limited. But, once your marketing campaigns start hitting the right chords of the audience, you start to get loads of traffic and loads of data requests. This puts pressure on your basic server. The next step is to purchase a bigger server with more bandwidth and more storage options. Once your website reaches another milestone of traffic and data, you need a bigger server. A constant lookout is always there. 

 

Serverless Architecture or Serverless Computing 

 

To avoid all this hassle, serverless architecture was introduced. And, to support the serverless architecture, the developers write the server-less functions. These are a single-purpose piece of code. The developers just have to upload the code and tell the cloud computing company about how to implement it. 

 

Cloud computing companies play a major role here as they host the programmatic serverless functions written by the developers. It’s their job to take care of the code’s maintenance and execution in an easy and quick way. 

 

Amazon’s Lambda Serverless, Google Cloud Functions, Microsoft Azure Functions, HubSpot Serverless Functions are some of the leading serverless functions vendors in the market.  

 

HubSpot introduced Serverless Functions Update in May 2020 

 

With HubSpot Serverless Functions you can; 

 

  • Collect data and store it in HubSpot CRM or HubDB 
  • Develop complex data calculators 
  • Display data from other systems dynamically 
  • Prepare event registration systems 
  • Develop submission forms that send data to other systems 
  • In Hubspot CRM, the serverless functions’ code is stored in the user’s file system which is accessible through the Design Manager. The developers/designers can locally edit/save the code. 

 

Naming the serverless functions folder: You can name the serverless functions folder anything but the only condition is that it must contain a suffix (.functions). 

 

For example: Home-page-function.functions 

 

With serverless functions in place, the owners don’t have to search for new servers every time they wish to expand their business website or application. The cloud computing company (here, HubSpot) will automatically increase your server capacity seeing the load it is getting. And, if the load from your website is reduced, it will pull down the bandwidth. 

Simranjeet Singh

Written by Simranjeet Singh

Writer | HubSpot Certified Inbound Marketer and Content Marketer