Welcome!

Java IoT Authors: Pat Romanski, Liz McMillan, Yeshim Deniz, Elizabeth White, Zakia Bouachraoui

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.

IoT & Smart Cities Stories
Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or per...
A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to great conferences, helping you discover new conferences and increase your return on investment.
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER gives detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Miami Blockchain Event by FinTechEXPOalso offers sp...
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
SYS-CON Events announced today that IoT Global Network has been named “Media Sponsor” of SYS-CON's @ThingsExpo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. The IoT Global Network is a platform where you can connect with industry experts and network across the IoT community to build the successful IoT business of the future.
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
@DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time t...