
FundingHub has reached a new milestone of implementing a serverless solution in a brand-new staging environment. Celebrations are nigh, but let’s be honest, what’s the big deal?
Traditional servers come in many shapes and forms, but a general use case is to reserve some form of computational space and networking to host your website. This means you had a dedicated computer with certain performance specifications that was used to serve your content. If too many people visited your site at once (looking at you, Takealot and One Day Only) the computer gets overloaded, and as a consumer you are left spamming F5 *Question from Ean – what is spamming F5?
Serverless means that we do not have a dedicated computer running our API. Instead, a tiny computer spins up to handle the first request that is sent to the API. This is called a container. The container lives for ten minutes, and if no other request is received it switches off. If two requests come in and the first container is busy, a second container spins up and handles the request. The system simultaneously saves reserved computational time when the API is not used and is excellent at handling requests asynchronously during high demand.
It gets more complex, because containers can result in background tasks that need to be executed without affecting client performance. In the FundingHub realm, this includes tasks such as matching, syncing to and from HubSpot, and sending out notifications based on matching results. We push these background tasks on to a queueing service, and in a harmonious orchestration, containers are switched on to handle these tasks. Once all the tasks are completed, every container sits around for a while, and then shuts down.
Think of the yo-yo fad we all went through. Sure, it is nice to be part of the crew when you rocked up with your normal yo-yo, but there is always that one kid who had a yo-yo that made sounds and had little lights that came on when it gained enough momentum. The normal yo-yo represents the adequate traditional servers. Serverless is bells-and-whistles yo-yo in the dev world and all devs look jealously at peers who live in the serverless world.