Microservice architecture and Raygun

| 3 min. (620 words)

With the much of the software industry shifting towards a service-oriented architecture (SOA) approach to their software design several new paradigms have emerged. Microservices have arisen as a popular pattern for implementing SOA design principles. Here at Raygun, we support a variety of different ways to handle your microservice architecture.

What are microservices?

Microservice architecture is based around the idea that several small, independently deployable software systems are easier to create and maintain than a single large software system. Aiming to increase cohesion and reduce coupling within a software solution, microservices typically have the following key things:

  • Services are small, focusing on a single area of responsibility (billing, logistics, etc.)
  • Services are independently deployable
  • Services can be of different programming languages, hardware, and environments
  • Services should encourage automation of deployment and testing to reduce burden on operations and development resources

An example of this sort of structure versus the typical monolithic software system would be taking a banking application and splitting out the different internal contexts into microservices. Instead of one large system you’d have independent services/systems handling billing, deposits/withdrawals, front-end, and so on. So when a change needs to be made to the billing system, the entire system would not need to be taken down or redeployable, only the microservice that was changed.

What are the drawbacks of microservices?

While incredibly useful, microservices can have some drawbacks that should definitely be thought through before making a switch.

  • Complexity

Microservices abstract the complexity of a monolithic application out of the code itself and place it on the network. While the individual software systems are simple, the resulting network that ties them together becomes more complex and requires more fault-tolerance and load balancing.

  • Testing and Deployment

With the reliance on sending messages between services over a network, the testing and deployment of microservices becomes harder. Rather than being able to test a system from beginning to end in one system, you now have to rely on complex staging/test environments or the usage of ‘mocked’ calls and responses to simulate the entire system.

  • Performance

While the individual performance of the microservices may be faster due to their smaller size and context specific purpose, the reliance on sending messages between services via the network can bring down performance due to network latency and message processing.

So how can Raygun help?

Raygun offers support for microservice architectures with the freedom of the Raygun ‘application’. Applications are defined in Raygun as anything reporting data to Raygun using a specific API key. So you may have a single monolithic application or a system with dozens or even hundreds of microservices, you can group them or split them up however works best for you. This allows you to configure your Raygun setup to be as granular or overarching as you need it to be.

To better illustrate this here are few example use cases for both a monolithic banking application and a banking app based on microservices.

Monolithic Banking App

Microservice based Banking App

Final thoughts on microservice architecture

As you can see, our application system allows you to determine how you want to structure and organize your application or services inside Raygun. Given the rise of microservices and service-oriented architecture, having this customization available allows you to adapt as your software systems grow and change over the years.

Do you have any interesting use cases or examples of how you’ve setup your Raygun applications with microservices?  Leave us a comment and let us know!

Raygun Crash Reporting gives you full stacktraces for each and every error occurrence, along with environment information, HTTP requests, raw data, browser, OS, affected users and more. Take a free trial here, or book a short demo with one of our team.