Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Combining serverless and microservices has its benefits

Uncover the advantages that result from coupling serverless with microservices, and see how cloud providers prepare for customers to use these technologies together.

When a new cloud service model emerges, it attracts attention.

When cloud providers started to offer what's called serverless, a form of cloud computing where you pay only for the time you use, it piqued customer interest. Today, there's a growing confusion over just what serverless is and how it relates to microservices, functions, lambdas and so forth. Is serverless really a revolutionary service model, or is it just a buzzy trend with limited practical uses? The answer depends on your needs.

How do serverless and microservices relate to one another?

Serverless is a model of cloud hosting where an application, or component, loads and runs on demand rather than one that simulates to be available on call. Because serverless components can load on demand, can load anywhere and can scale to any quantity needed, it stores nothing between uses. This signifies a different application structure, which means you have a stateless component, or one that doesn't remember anything. Stateless components are often referred to as a function, a lambda or a microservice.

Stateless microservices are part of an evolving development model that signifies a shift toward greater elasticity in deploying applications and more component sharing. The main focus of this particular trend is to host microservices on containers. This is because containers offer a lower overhead than virtual machines (VMs), and container orchestration tools, such as Kubernetes, lend themselves to microservice deployment. In this development mission, microservices are really an extreme model of services and are easily understood.

Where does it make sense to use serverless and microservices together?

Too much componentization is a bad thing for applications because it increases latency and operational complexity. In traditional applications, you can expect that microservices will advance in large part because they get paradoxically bigger and more like traditional services. You can also expect the security, scaling and sharing aspects of microservices to remain -- and even the stateless aspects, too. As for transactional activity, componentization limits will hold back true microservice growth.

Fortunately, something else has come along. If there's any shift in the way apps use microservices, then this shift must address how they're invoked, since their functionality is essentially whatever is written into them. Semantically speaking, if the traditional model calls microservices, then the emerged, alternative model must trigger microservices.

It's here where a convergence between microservices and serverless exists. When serverless was first introduced by Amazon and Microsoft in their clouds, it was directed primarily at event-triggered applications such as IoT. These types of applications run intermittently and thus often can't justify committing to persistent cloud VMs or servers. However, IoT isn't the current focus of serverless for any of the cloud providers. The ever-changing notion of what constitutes a trigger has altered the scope of serverless.

Application and business process orchestration drives serverless microservices combo

The leading edge of both serverless and microservices is event-driven application and business process orchestration. Almost everything an enterprise does with IT is essentially a choreographed set of separate steps supported by different applications and often different workers.

The cloud providers figured out that applications can trigger events to mark their progress, and then these events can trigger other steps and other applications. With this new approach, serverless or microservice functions don't process IoT events, instead they orchestrate application workflows. This new mission may just transform the whole model of serverless computing.

Application and business process orchestration through serverless and microservice technologies have three elements. First, applications must have the capability to generate triggered events. Second, a mechanism must exist to activate processes according to those triggers. Finally, a method must exist to define the possible workflows or sequences of tasks -- both normal and abnormal -- and to somehow impose that workflow structure on the stateless events and processes. Cloud providers now provide all three of these elements.

Orchestration and integration tools like Amazon's Step Functions or Microsoft's Logic Apps, can both sequence application components, such as microservices and serverless, based on events that are generated by significant steps in other applications. Microsoft, in particular, expands the use of connectors that provide a trigger for things like document changes in Office. These connectors can then kick off other applications and update databases, for example. They can also trigger user-developed functions and microservices that run on demand as serverless components.

Amazon and Microsoft both offer respective case studies to illustrate the use of Step Functions and Logic Apps in orchestration missions. These examples show that serverless and microservice components can play the same roles in distributed business application and process orchestration that were traditionally played by service bus technology.

Here, the addition of more useful application-generated triggers improves the granularity of the events generated. Instead of simply controlling what gets activated based on data examination, as BPL typically does, you can control processes based on signals from within other processes.

Note how Microsoft's Power BI relates to its Office 365 suite and in comparison, how Office tools can use connectors to generate events that Logic Apps can then orchestrate. Microsoft has moved Logic Apps to a position directed much more at business integration. Amazon and Google both offer similar capabilities for their own cloud-hosted features, and Google recently expanded its support for hybrid applications when it extended its Cloud Platform to on premises.

The idea that microservices and serverless could join to bind business processes and integrate business applications from desktop and data center to the cloud is transformational. Event-driven serverless microservices could provide the perfect way to fulfill a multitude of business needs. How this happens depends on the ongoing cloud provider battle for control of business and applications orchestration.

Enterprises were never the largest cloud users as that honor goes to high-tech social media and content firms. But this will change. Microsoft already has a larger share of the enterprise cloud market, and both Amazon and Google want much larger pieces of the enterprise pie. Serverless and microservices are going to play a big role in the battle, and enterprises will be the real winners.

This was last published in December 2018

Dig Deeper on Service orchestration

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

Do you view serverless microservices as a game-changing service model? Why or why not?
Cancel

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide.com

SearchWinDevelopment

DevOpsAgenda

Close