Be as Serverless as You Can, but Not More than That
Take a look at what you should consider before putting the serverless stamp of approval on all your products and services.
Join the DZone community and get the full member experience.Join For Free
no doubt, if you've been paying attention to technology trends, you've seen the rise in interest of "serverless." in some accounts, "serverless" is billed as the next application architecture style. i've even heard people say, "you don't need technology x because serverless is the way of the future" or that, "technology x is a red herring because serverless." in this installment, we see why it's not about microservices vs. serverless.
the best description of serverless i've seen thus far comes from patrick debois in his "serverless to service-ful" talk . in that talk, he gives serverless a definition and actually defines what it is and not what it's not. focusing on what it's not (no servers!) actually distracts from any true meaning (of course there are servers!). by focusing on the fact that it's more about using as-provided services (think things like sqs, dynamodb, gmail, google calendar, salesforce, fastly, etc.) and stitching them together to provide some kind of functionality, we can arrive at a more interesting definition :
outsourcing core infrastructure services to service providers and stitching it all together through apis (and functions) to deliver business value
in many ways, this idea of "leveraging existing services and building on top of it" isn't new. it's an incarnation of the spirit behind services oriented architecture:
if we can leverage existing services that lower the barrier of entry (i.e., sign up for an api instead of procuring hardware, setting up security/networking/dns/operating systems, etc.), we can more quickly build interesting things for our customers. this is one part about what serverless is. the second part is the fact that you don't have to own all of the technology from these different services. that is, you pay for usage (metered) and sla, and you don't own and have to solve difficult technical problems to work on business-value providing functionality. this point was well communicated by ben kehoe in a recent podcast . i completely agree with this.
so when i'm asked by our customers, "if serverless is the next evolution of application architecture should i just skip over microservices and containers?" the answer:
be as serverless as you can, but not more than that.
let's dissect that.
as technologists, we are drawn to technology and any of the new shiny trends. serverless, containers, and all the others all count. but at the end of the day, our role as technologists is to help the business find and exploit business value and do that faster than our competitors.
if we're at the "explore" part of our application lifecycle (as all startups are), what we want to do is quickly validate our hypotheses about what will deliver customer value and equally quickly find what does deliver value. customers aren't able to articulate what they value until they see it. it's best to rapidly experiment by putting services out in front of them and observe how they respond. if something shows little customer interest, it's best to ditch it and move on. to do this, we cannot sink massive investments into setting up infrastructure, development costs, partners, etc. we have to run these experiments as cheaply as possible and the serverless approach presents an excellent opportunity to do this. we can create digital properties for our customers by leveraging existing technical services without massive investment and critically: we can pay as we go. if we have zero interest in our new product/service, then it doesn't cost us much. if we have some initial unpredictable, spikey interest, we have a platform (services + faas) that can quickly scale without much headache.
if we stumble upon something that does provide customer value, then we want to build on it, scale it, and build a profitable product around it. at this point, you may find yourself wanting to go toward a partly serverless and partly not-serverless architecture to solve for this. you'll have to confront both technical decisions around questions like, "how much of my stack should i own to be able to deliver business value and differentiation?" and, "am i willing to outsource sla, regulatory compliance, price, and roadmap to my service provider?" in the exploratory phase, outsourcing everything to service providers may be fine. but as a business matures, real discussion about how the organization is impacted by these decisions. this is a very real problem affecting our customers.
as you start to find predictable patterns for your new product/service, decide you want to optimize certain parts (both for cost and technical things), you may decide the serverless approach is too expensive and it may be worth taking ownership of more parts of the stack. take a look at this account of serverless and its surrounding infrastructure becoming too expensive for an application with more predictable usage patterns
lastly, for your existing applications that do generate a pile of money, you cannot just magically move that all off to service providers. you can, however, try to modernize parts of them to participate in some of the newer digital initiatives your company has. we see organizations making massive strides toward higher performing it and organizations by modernizing to services architectures (microservices/apis/soa etc) built on containers and kubernetes, which if extended to its logical conclusion, can be built as a platform of organizational services which enable parts of an organization to go serverless. that is, parts of the organization (those engaged in exploratory efforts) can leverage the rest of the enterprise without having to strictly own the full implementation.
different parts of the enterprise portfolio and different spectrums of the application-development lifecycle require different tools and different approaches with all of them aimed at answering the question, "what's the best way to go fast and deliver value given my current context?" we should be more focused on unearthing what our real "context" is and make the best decisions on investment, ownership, technology, etc based on that.
- where are you in your product lifecycle?
- what technology should you own to solve your business problems?
- how comfortable is your team currently with existing technology?
- how strategic and "core" to your business is the functionality you're thinking to take serverless?
happy to take disagreements or thoughts in the comments or on twitter @christianposta
Published at DZone with permission of Christian Posta, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.