How we maintain och keep track of our microservices

Microservice dashboard in Copyl

Table of Contents

Copyl is built up by independent services that serves business critital functionality to our customers. When scaling out, getting more and more services, we have followed some rules from the beginning that certainly helps us today.

Microservice Management

We use our own product here because there was no else solution out there that could help us with documentation, status and logging.

Dashboard gives us a quick status update

The startpage of the Microservice Management tool displays all microservices and their statuses.

Microservice dashboard in Copyl
This was a bad day when we had 5 APIs reporting errors at the same time.

To see more information from the log, just click on the microservice.

Two generic calls

We have two calls in every api that we use to find out how quick responses we get from the api, and one endpoint for maintenance. They are named the same in all APIs.

Copyl Microservice Management automatically ping APIs that has a endpoint called /ping that we can reach anonymously. The system measure the time each call takes and displays the information on your App Dashboard.

We see that latest ping took 133 ms (someone is sleeping at work…)

The maintenance endpoint often starts a stored procedure in the APIs database. The stored procedure has a collection of optimization scripts we run, among them a reindex if needed.

The maintenance jobs are started as a scheduled job in the Integration Platform.

Integration Platform

This is also our own product, created in the lack of existing one that we could afford, and that didn’t require a vendor lock-in.

We generate events/triggers in our APIs when something has happend, and send that event to Copyl’s Integration Platform. Then we have defined integrations that should run on each trigger. So when a user is created in one API, it’s also created in the other APIs. No hidden integrations in code – everyone can see which integrations are running and not. And they are all automatically documented in the Microservice Management documentation.

API Manament Service

We use an external service in front of all of our APIs. This means we can monitor the requests and set up constraints for our APIs on how many calls that can be made from each customer. We also get one common url for all of our APIs;

We are also protecting the APIs with another tools that stops DDOS and other forms of attacks.

Azure Container Apps

Normally, we wouldn’t talk that much about containers and where we run them but I’ll make an exception now. ACA scales with the requests made to the different APIs, meaning we don’t have to pay for server capacity that isn’t utilized on weekends and certain hours of the day. We don’t need to do any operations on this service, it just works. If an instance is crashing, we wouldn’t notice that, because a new instance is up and running instantly. Yes, we can see the crash in the logs.

I should say that it took a while to configure the correct number of calls that should scale out the service. And some of the containers runs on a larger than default CPU and memory.


Do You Want To Boost Your Business?

Drop us a line and keep in touch

Copyl CRM for service companies