Welcome!

@DevOpsSummit Authors: Yeshim Deniz, Liz McMillan, Zakia Bouachraoui, Pat Romanski, Elizabeth White

Article

Microservices design: Get scale, availability right

Microservices design

microservices-planning-scale-availability

At Electric Cloud, we’re seeing an almost exponential growth in our customers’ interest in microservices and containers, even though we’re still in the early days of their use.

The promise of microservices is that you can divide and conquer the problem of a large application by breaking it down into its constituent services and what each one actually accomplishes. Each can be supported by an independent team. You get to the point where you can break the limits on productivity that Fred Brooks described in his book, The Mythical Man-month.

Aside from being able to throw more people at the problem and—unlike what Brooks observed—actually become more efficient once you get a microservices-based application into production, you can quickly start thinking about how to scale it. Think resiliency and high-availability. And you can easily determine what services don’t need scaling, or high availability.

These things become easier than with a large, monolithic application, because each microservice can scale in its own way. Here are my insights about these variables, and the decisions you may face in designing your own microservices platform.

How do you know when to scale a microservice?

The nice thing about running in a microservices environment is that you don’t have to scale everything in order to scale something. You may have some services in your application that don’t need to scale at all. They may be fine running as a single service (or as a dual instance service, simply for failover). On the other hand, you may have many services that really do need to scale, to the tune of a dozen or hundreds of instances of a particular service.

For example, your shopping website has many features you want to present to users as they are browsing and shopping. You probably have a recommendation service, which provides options that might attract users according to their search terms or current web page. Now, you can make that recommendation service part of your entire monolithic application, or you can break it off into its own service. It’s the same with the shopping cart service and the avatar service that may show users a pre-selected image of themselves when they log into their accounts.

But when you think about the work that the avatar service must do, it’s not much. It must search through a repository of images, and return a particular user’s image. This is a well-understood requirement that doesn’t need to scale.

On the other hand, the recommendation service is going to be more complex, and fairly heavy-weight. Each user session presents a new set of variables. What is similar when they search for product A? What do they end up buying when they search for product B? There’s much more data involved, more querying, all part of a more compute-intensive capability. This is very different, from a scaling perspective, when compared to a tiny avatar service that simply hands out a JPEG file every time that’s requested during a user session.

Give every service its own level of availability

With microservices, you don’t need the same availability for each service. Not everyone will talk about this, because you may not want to say to your team “service A doesn’t have to be as available as service B.” But at the end of the day, the shopping cart had better be highly available, or your customer won’t purchase anything. But if the avatar service suddenly isn’t available, and instead shows a blank box, customers probably are either going to buy fewer things or leave your site altogether.

The point is, you can have different requirements for your services in terms of uptime, scalability, delivery frequency, and more.

Use purpose-fit technology stacks

There are many things that are good, and interesting, about microservices. As separate services, they only communicate over the network,  which means that you can use completely different technology stacks to support each one.

You can determine what’s fit for purpose using a key-value store, for example, if that’s important. If you’re using a relational database for your shopping cart service, you’re probably doing credit card authorization, which involves a bit more of a technical stack than if you’re doing recommendations based on a big data analytics engine.

Think how that compares when you use a monolith. You need to make a lot of compromises. You’re going to have to pick one technology stack that works for every problem you have to solve, which means it’s difficult for organizations to adopt and use new technologies. If I need to revise some feature within my monolith, I’m not going to rewrite the whole thing just so that I can use some cool new framework. But with a microservices architecture, that isn’t an issue.

The right size, complexity for a microservice is…

Whey I get asked what I think is the right size or level of complexity for a microservice, as I often do, I tell them that, as a general rule of thumb, you should be able to have a small team rebuild it, from scratch, in a few weeks. That means doing it within one sprint, or maybe two at most. With that focus, you can adopt new technologies to replace or augment parts of your application architecture.

In the monolith scenario, you’re much more constrained in your technology choices, simply because one size must fit all. But when you break down the problem into more fundamentally independent pieces, you can use the technologies that best fit the service.

That flexibility is a great benefit.

So are you ready to design your microservices?

 

http://cdn.electric-cloud.com/wp-content/uploads/2015/05/TechBeacon-Logo... 115w, http://cdn.electric-cloud.com/wp-content/uploads/2015/05/TechBeacon-Logo... 230w, http://cdn.electric-cloud.com/wp-content/uploads/2015/05/TechBeacon-Logo... 100w" height="43" width="139" alt="TechBeacon Logo" src="http://cdn.electric-cloud.com/wp-content/uploads/2015/05/TechBeacon-Logo.jpg" class=" wp-image-20545 alignleft" />This article originally appeared on TechBeacon.

More Stories By Anders Wallgren

Anders Wallgren is Chief Technology Officer of Electric Cloud. Anders brings with him over 25 years of in-depth experience designing and building commercial software. Prior to joining Electric Cloud, Anders held executive positions at Aceva, Archistra, and Impresse. Anders also held management positions at Macromedia (MACR), Common Ground Software and Verity (VRTY), where he played critical technical leadership roles in delivering award winning technologies such as Macromedia’s Director 7 and various Shockwave products.

@DevOpsSummit Stories
This sixteen (16) hour course provides an introduction to DevOps, the cultural and professional movement that stresses communication, collaboration, integration and automation in order to improve the flow of work between software developers and IT operations professionals. Improved workflows will result in an improved ability to design, develop, deploy and operate software and services faster.
Enterprises are universally struggling to understand where the new tools and methodologies of DevOps fit into their organizations, and are universally making the same mistakes. These mistakes are not unavoidable, and in fact, avoiding them gifts an organization with sustained competitive advantage, just like it did for Japanese Manufacturing Post WWII.
The digital transformation is real! To adapt, IT professionals need to transform their own skillset to become more multi-dimensional by gaining both depth and breadth of a wide variety of knowledge and competencies. Historically, while IT has been built on a foundation of specialty (or "I" shaped) silos, the DevOps principle of "shifting left" is opening up opportunities for developers, operational staff, security and others to grow their skills portfolio, advance their careers and become "T"-shaped.
When building large, cloud-based applications that operate at a high scale, it’s important to maintain a high availability and resilience to failures. In order to do that, you must be tolerant of failures, even in light of failures in other areas of your application. “Fly two mistakes high” is an old adage in the radio control airplane hobby. It means, fly high enough so that if you make a mistake, you can continue flying with room to still make mistakes. In his session at 18th Cloud Expo, Lee Atchison, Principal Cloud Architect and Advocate at New Relic, will discuss how this same philosophy can be applied to highly scaled applications, and can dramatically increase your resilience to failure.
Digital transformation is about embracing digital technologies into a company's culture to better connect with its customers, automate processes, create better tools, enter new markets, etc. Such a transformation requires continuous orchestration across teams and an environment based on open collaboration and daily experiments. In his session at 21st Cloud Expo, Alex Casalboni, Technical (Cloud) Evangelist at Cloud Academy, explored and discussed the most urgent unsolved challenges to achieve full cloud literacy in the enterprise world.