651.288.7000 info@intertech.com

Getting Started with Microservices: Top Tools & Techniques

by | Mar 20, 2019

If you take a survey of the top trends in software development over the past few years, then you’ll find microservices on nearly every list. However, if you ask ten different developers what a microservice is, you’re likely to get fifteen different answers. In this post, we’ll clear up some misconceptions. In addition, we’ll share the top tools and techniques microservices devs are using to build highly scalable, modular applications.

How Microservices Work

One of the core concepts of good software development is separation of concerns. In general, if a process or object needs to be created multiple times, then we’ll want to standardize and separate that component. As a result, our application becomes easier to maintain and scale.

Microservices is the ultimate incarnation of separation of concerns. Instead of creating a new method or class when we separate out some logic, we create an entirely new service. That service then talks to the rest of the application via an API. Therefore, we can make changes to the internal logic of the service without it breaking the rest of the application. We can even replace a service altogether with a new one, as long as the API endpoints and messaging format remains the same.

For the most part, microservices are broken down across business concerns. For example, Netflix likely has many services. First, one service handles login authentication. Next, another service might generate recommended movies for you. Yet another service handles monthly billing. Every component of Netflix is its own service. Altogether, they work to create the complete application.

Microservices make an application easier to understand, develop concurrently, test, and scale. For that reason, microservices applications are more agile than their monolithic counterparts.

Architecture

As we’ve seen, individual microservices follow business use cases. Each individual microservice can be implemented in any language or framework. Indeed, the only thing that matters is the service’s API.

As a result, the most important thing to decide about your microservices architecture is not how each service will be implemented. Instead, focus on how those services will communicate (synchronous, asynchronous) and what protocol they’ll use to do so (REST, message queues, etc.).

Within each service, there is an API gateway, the business logic of the service, and the service’s own datastore. In addition, most architectures include some load balancing solution that knows when and how to spin up a new instance of the service in cases of high request volume. The microservice is a self-contained mini-application that handles only one business case.

Operating System, Containers, & Orchestration

When it comes to deploying microservices, Linux dominates in terms of operating system. Moreover, slimmed-down versions of Linux like CoreOS or Atomic are popular. This is because they’re quicker to spin up, have less storage overhead, and therefore provide fewer attack surfaces from a cybersecurity perspective. With microservices, there’s rarely a need for a full-fledged Ubuntu or RedHat distribution.

To create these self-contained instances of CoreOS or Atomic, there’s no competition to Docker. Unquestionably, Docker is the dominant player when it comes to containerization. Furthermore, Docker containers can spin up in milliseconds. As a result, your application can rapidly respond to demand.

In a complex application, you may run dozens of microservices on separate containers. Managing and orchestrating container creation, processes, and destruction is the job of an orchestrator. Kubernetes and Docker Swarm are essentially your only two options, here. Kubernetes is the more established option, with Google backing and a large community. Docker Swarm enjoys the benefits of being tightly integrated with Docker, but has a smaller community.

In addition, companies implementing microservices need a CI/CD pipeline. With various teams working on different services, automated testing, integration, and delivery is essential. In short, you won’t see the agility benefits of microservices without a solid deployment pipeline.

Making Microservices Work for Your Company

For your company, the shift to microservices likely won’t come overnight. However, you can gradually separate parts of your application into new services. As a result, developers can work in parallel on separate business concerns. Moreover, your application becomes more resilient and less reliant on proprietary solutions since components can easily be swapped out.

Microservices implementation will be different for every company, but the challenge of making the switch is worth the reward.

Ready to build your own microservices? Check out our microservices tutorial guide.

About Intertech

Founded in 1991, Intertech delivers technology training and software development consulting to Fortune 500, Government and Leading Technology institutions. Learn more about us. Whether you are a developer interested in working for a company that invests in its employees or a company looking to partner with a team of technology leaders who provide solutions, mentor staff and add true business value, we’d like to meet you.

Follow Us

Categories

Intertech Consulting
Course Finder
Design and Code Review Checklist

Like What You've Read?

Subscribe to the Blog.

Every Friday we send that week's content from our Developers via email. Try it out!

Some ad blockers can block the form below.

You have Successfully Subscribed!

Pin It on Pinterest

Share This