First introduced in 2014, JAMStack is a more modern approach to building fast, secure, highly scalable and well-performing websites and apps. Instead of a commercial offering, JAMStack is a community-based set of best practices and workflows to maximize website-building efficiency.
Currently, there are more than one million developers and businesses using JAMStack through various platforms to run global projects, without having to deal with servers, DevOps or expensive infrastructure. Instead, JAMStack uses tried and tested technologies:
- HTTP APIs instead of specific databases, and
- Prebuilt Markup for the delivery system.
JAMStack’s most impressive feature is speed. When Smashing Magazine switched from Wordpress to JAMStack, their HTML serve time plummeted from 800ms to 80ms. Speed isn’t only fun, it’s crucial for businesses: studies show that a one second delay in loading time can lose 7% of conversion for an ecommerce site. BBC loses 10% of its users for every additional second it takes their site to load.
If 29% of the internet currently runs on Wordpress – including blogs, news sites and online shops – imagine how much safer and more efficient the internet could be if everybody followed JAMStack practices. As well as making the internet better, faster, stronger, JAMStack is also smoother and easier for developers to work on than traditional website builders like Wordpress.
But what’s wrong with the old way?
It’s slow and vulnerable. The traditional web building method is known as Monolithic. In this approach, data has to go through a grand journey from its database, get rendered against a template, processed into HTML and finally travel across an entire ocean of a network (sometimes literally) to get to the browser. And this happens for every single online request. It’s exhausting even to think about it.
As well as slowing down requests, monolithic approaches in building software have other drawbacks. They require highly dependent software, are language and framework dependent, easy to break, and very difficult to equip with new functionalities.
Deploying updates to very large websites and applications can destabilize them for a considerable time. Fixing bugs, updating libraries or changing frameworks in one area can break another. Caching can be used in between steps to increase the speed of heavier websites, but it can be very difficult to do in dynamic websites.
Another struggle for monolithic websites is safety. According to recent studies, 29% of the internet runs on Wordpress, followed by Joomla and Drupal. Because these management systems are so popular across the Internet, they are very prone to malware attacks, especially considering that all their pages and plug-ins are combined into a single web project’s huge codebase. To keep these projects safe, developers have to keep up with several security packages. More often than not, these updates are buggy and can break the entire website.
And how can JAMStack make the internet better?
Comparing the traditional web architecture to JAMStack’s much simpler approach, we can see several benefits, especially speed, security, and scalability. Coding on JAMStack is flexible and intuitive and it lets developers get creative, instead of being confined to rigid monolithic infrastructures.
We mentioned earlier how fast Smashing Magazine got their new and improved website to load after switching their infrastructure from Wordpress to JAMStack. When Pinterest was rebuilt, its wait time decreased 40%, leading to larger SEO traffic and conversion rates. These rapid connection rates are made possible by JAMStack’s static assets, which can be served very quickly.
The word “static” is a little misleading. Actually, JAMStack projects can be very dynamic, even more so than monolithic websites. When we say static, we mean the HTML is hosted in several different servers and can be loaded by the one that is physically closest to the client. With JAMStack, data travels a much shorter distance than on traditional, monolithic architectures. Each time content is requested by a user, instead of going around the globe, coming from one single server, data goes through several CDNs (Content Delivery Networks) or microservices to reach their destination.
Think of it like a restaurant. In monolithic websites, the servers would have to prepare a new dish every single time someone asks for food (data). But with JAMStack, dishes would already be pre-made, ready to be finished and served immediately. Some customers may not mind looking out the window or chatting while they wait, but mobile users are like busy new yorkers who want their bagels right now before they can catch the subway and head to their next business meeting.
Monolithic websites that run on heavy servers are like big company buildings. A little fire in the storage room could easily shut down the whole enterprise. But when you spread out your company into several little working stations – or even let your employees work from home or their favourite café – it’s difficult to reach every single worker or steal all of the company’s post-it notes at once.
Serverless sites work in a similar way. They are not stored in a single database, but in several CDNs that are much harder to attack. Their architecture also gives the developer some breathing room when one of its microservices’ stops working. Since they are all independent, one of its bugs won’t necessarily affect any of the others. JAMStack also works with less code – or surface area – than a traditional website would, which means it has less chance of being attacked and fewer vulnerabilities in need of constant patching up.
JAMStack’s great security comes from these three core principles:
• A minimal surface area with read-only hosting infrastructure
• Decoupling front-end from back-end to keep services from being exposed to the public
• An ecosystem of independent and secure APIs
With JAMStack, developers don’t need to maintain a website’s backend like you would a Wordpress site, with all its security packages and potentially buggy updates. In read-only systems, the only thing that clients can access is the frontend, while all that is stored in the backend is an API database.
Imagine you built a tiny pet care blog, but in a few months it grew much more than you had expected. After all, your research was strong and you posted such cute pictures of your dogs. Now you have to pay for a larger hosting to deal with higher traffic and avoid crashing your website.
In monolithic web projects, developers have to anticipate how much traffic a website will bring and plan accordingly, which is both expensive and very difficult to get right. On JAMStack you don’t have to worry about that. Since JAMStack works with pre-rendered HTML and global delivery, your web projects can scale as needed without overloading or crashing.
Plus, you can use platforms for automatic integration and to deploy your projects directly from your favorite git system. This makes the experience a lot smoother. Instead of wasting their time debugging, developers can use all their creativity and talent to make fast, well-performing and fun websites.
JAMStack wants you!
The greatest thing about JAMStack is it makes the internet a fun and revolutionary playground again. As a developer, it might take some getting used to at first, but you’ll eventually fall in love with it.
If you want to know more about JAMStack, you can visit JAMStack’s official website. The server-less conversation is going on right now and you can join it online at Twitter, in global meeting groups or in JAMStack’s official slack community. To set up you JAMStack website, you can use Azion Edge Platform to deliver your content and Edge Functions to personalize your JAMStack website.
There are, however, some cases where it might be best not to use JAMStack. If your website is doing fine as it is, switching the whole infrastructure might be overkill – for now, at least. But, if you are starting a new project from scratch, or redoing something you had trouble with in the past, consider using JAMStack. It will give your visitors a wonderful experience and will be a fun ride for you, too.