Skip to content
  • Services
    • Strategy
    • Customer Experience
    • Agile Delivery
    • Security
  • About
  • Partners
    • Aha!
    • Amazon Web Services (AWS)
    • Atlassian
    • Cloudflare
    • GitHub
    • InVision
    • Ionic
    • Pendo
    • Radar
    • Vue.js
  • Work
    • Modus Create Labs
  • Insights
    • Blog
  • Careers
  • Contact
  • Services
    • Strategy
    • Customer Experience
    • Agile Delivery
    • Security
  • About
  • Partners
    • Aha!
    • Amazon Web Services (AWS)
    • Atlassian
    • Cloudflare
    • GitHub
    • InVision
    • Ionic
    • Pendo
    • Radar
    • Vue.js
  • Work
    • Modus Create Labs
  • Insights
    • Blog
  • Careers
  • Contact
December 20, 2019

Serverless – AllTheThings (Part 1 of 3)

AWS, DevOps, JavaScript, Serverless, Vue

This is part one of the Serverless – AllTheThings three part blog series. You can review the code from this series on the Serverless-AllTheThings repo.

Serverless software architecture – the golden goose to many and just a fad to others. This controversial architecture hasn’t been around for long and like many software engineers I stumbled upon it when Amazon Web Services (AWS) announced Lambda about 5 years ago… and it was love at first sight.

What’s This Serverless You Speak Of?

In part 1 of this blog series, I cover what serverless is, what it isn’t, and some of my serverless lovers spats over the years. In part 2 I’ll dig into an example serverless front end and in part 3 I’ll explore an example serverless back end.

First things first, let me address the misnomer and elephant in the room: serverless does not mean computing without servers. That would be silly, but the name is provocative and that’s likely why it stuck.

As it’s used today, serverless computing means that the service provider manages the computing resources (e.g. keeps the firmware up to date) and the resources scale up and down automagically (horizontally and/or vertically to meet demand). No more; no less. But alas, the devil is in the details.

The Golden Child

In a perfect world, the decision to go serverless would be a no brainer. Serverless would mean computing resources:

  • Scale down to zero
  • Scale up to infinity
  • Scale instantly
  • Start instantly
  • Work for all languages, frameworks and technologies
  • Run anywhere
  • Cost money only when in use

This is the promise of AWS Lambda and on the surface it is fairly accurate. With AWS Lambda you are able to execute many aspects of serverless full stack architecture, including:

  • Server-side rendering (SSR) of single page applications (SPAs) at locations close to the end user via AWS’s edge network (CloudFront)
  • Gluing miscellaneous components together via triggers and step functions
  • Scalable, on-demand backends via API Gateway

With regard to data management, AWS offers multiple serverless services, including: an object storage solution S3, a SQL solution Aurora Serverless and a NoSQL solution DynamoDB. Each of these solutions provide scalable, on demand storage of data.

The grass is always green, it’s always sunny and serverless is perfect … or is it?

The Red-Headed Stepchild

As I stated above, I’ve fallen in love with serverless, but that doesn’t mean I’ve kept my blinders on. We do not live in a perfect world and serverless is most certainly not perfect. The following are just a couple of the lovers spats I’ve had with serverless over the years:

Data Management

My ongoing friction with serverless is with regard to the data management offerings. Lambda doesn’t work well in VPCs (so you can’t efficiently query an RDS database), DynamoDB has very limited search functionality (it’s a key-value store that barely supports search in a non-scalable, costly manner) and Aurora Serverless can’t scale up from zero in a timely fashion.

There are many workarounds to the aforementioned problems, but most are costly and/or no longer serverless. My preferred workaround is to use Aurora Serverless (via the data API and AppSync) with pausing disabled in production environments. It isn’t free when the servers aren’t in use, but otherwise it still affords all of the other benefits of the serverless architecture. Part 3 of this series will cover this approach in detail.

Lambda@Edge

Although AWS doesn’t like to talk about it, Lambda does not cold start instantly. In fact, depending on the language and memory size of the function, the cold start time could be rather substantial. This is especially important for a Lambda@Edge function that directly impacts request and response times. As it stands, Lambda@Edge presently only supports Node.js and Python. It would be a huge win for serverless if AWS would open Lambda@Edge up to all languages (as it has done with non-Edge Lambda), including those that don’t have to load a heavy engine or runtime (like shell).

Another nit: Lambda@Edge functions are deployed and destroyed extremely slowly and throw quite a wrench into CI/CD pipelines.

In Summary

Serverless is awesome and is production ready across the entire full stack architecture, but it is not without its faults. That said, I’m head over heels for it and would strongly encourage everyone to give it a test drive when you have a chance. Stay tuned for part 2 of this serverless blog series where we’ll dive into an example serverless front end and provide you with everything you need to spin up an environment of your own.

Posted in AWS, DevOps, JavaScript, Serverless, Vue
Share this

Lucas Still

Lucas Still is a software architect at Modus Create. As a serverless evangelist and full stack wizard, Lucas spends his days converting technical dreams into digital reality. He is a certified AWS solutions architect professional, Vue enthusiast, TypeScript fan and RDBMS buff. Lucas is a family man living in the state for lovers in USA. When not coding, you’ll likely find him playing with his kids, DIY'ing his house or traveling around the country.
Follow

Related Posts

  • Promoting Blog Entries with AWS Lambda and Slack
    Promoting New Blog Entries with AWS Lambda and Slack

    Here at Modus Create, we're avid users of Slack as a team collaboration tool and…

  • Redirects Requests to a Domain with AWS Lambda
    Redirect Requests To A Domain With AWS Lambda

    Lambda is a serverless computing platform that allowscoding in C# (.NET Core), Go, Java, Node.Js,…

Subscribe to the Modus Newsletter

Receive the latest blog articles and insights every month from the Modus team.

Join Our Global Team

Would you like to be a Modite? We are redefining distributed consultative services. We have open positions throughout the globe.

See Open Positions

Let's Chat

If forms aren’t your thing, you can always call us (+1-855-721-7223).

Modus-Logo-Primary-White.svg
  • Services
  • About
  • Partners
  • Work
  • Insights
  • Newsroom
  • Careers
  • Contact
Virginia (US)

12100 Sunset Hills Road
Suite 150
Reston, Virginia, 20190
Tel: +1-855-721-7223

California (US)
12130 Millennium Dr

Los Angeles, CA 90094

Missouri (US)
609 E High St

Jefferson City, MO 65101

Romania

Str. Mihai Veliciu, no. 17
Cluj-Napoca, Romania
Tel: +40-0786-887-444

Costa Rica

2nd Floor, Plaza Koros, Av 3
San José, Santa Ana, Costa Rica

© 2021 Modus. All Rights Reserved.

Privacy Policy | Accessibility Statement | Sitemap

This website uses cookies.
These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information in order to improve and customize your browsing experience, and for analytics and metrics about our visitors both on this website and other media. To find out more about the cookies we use, see our Privacy Policy.

Accept
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.

Scroll To Top