Mercado Bitcoin Supports Global Crypto Exchange with Kong

Leading Brazilian cryptocurrency platform uses Kong to decentralize its architecture

A Household Name for LATAM Digital Asset Exchange

Founded in 2013, Mercado Bitcoin is a Brazilian-based company with a trading platform built to facilitate the international exchange of cryptocurrency and other highly valued digital assets.

In servicing over 2 million customers since its inception, Mercado Bitcoin has become the most widely adopted digital asset exchange platform in Latin America.

Following a large funding round in 2021, the company invested further in its global operations while accelerating its development roadmap with the goal of providing customers with an end-to-end ability to tokenize, guard and easily trade their digital assets internationally.

IndustryFinance
RegionLatin America
Use CasePerformance
Customer Since2017
20%

Reduced TCO by 20% by replacing the need for 15 cloud vendor-provided load balancers

40%

Reduced data latency and gained a 40% increase in mission-critical service performance by leveraging Kongs flexible plugin architecture

Challenge

Mercado Bitcoin Kickstarts its Microservices Journey With Kong Gateway Enterprise

When Mercado Bitcoin realized it was approaching a critical growth stage, João G. Lisanti and his Site Reliability Engineering (SRE) team prioritized decentralizing the company's monolith into microservices in order to reduce latency on the trading engine that normally handles more than 1.5 billion transactions per month of sensitive financial data.

Kong Gateway Enterprise was selected as the API management platform of choice to kickstart the company's journey toward scaling its distributed service architecture without adding overhead.

"With our trading engine receiving a high number of requests per day, optimizing for performance to match orders in a timely manner is always top of mind," said Lisanti. "Our rate limiting policies used to be entirely implemented by the microservices themselves -- now Kong sits as a layer in front of them to implement these policies. In our decentralization journey so far, the decision to bring in Kong has enhanced our architectural agility while simplifying the overall management of our microservices."

Solution

Kong’s Plugin Architecture Lifts Mission-Critical Efficiency

Mercado Bitcoin currently has 40 mission-critical services running behind Kong's API gateway. To boost the service efficiency of its popular trading platform which has just mere milliseconds of response time before receiving the next request, the SRE team found Kong's flexible plugin architecture to be an effective solution for reducing data latency while alleviating the rate-limiting workload that was burdening the platforms individual services.

"With the rate-limiting and request path transformation plugins provided by Kong, we were able to abstract away the rate-limiting responsibilities from our microservices. As a result, we were able to significantly reduce our latency -- we measured a 40% increase in our platform performance from using Kong's out-of-the-box plugins to manage our microservices," shared Lisanti.

Results

Mercado Bitcoin Reduces TCO by 20% With Kong’s Kubernetes Ingress Controller

To enhance its ability to effectively orchestrate a rapidly evolving environment, Mercado Bitcoin made the decision to move its services into Kubernetes.

The opportunity for cost optimization also entered the scene when the SRE team was able to remove 15 Elastic load balancers (ELBs) in favor of leveraging Kong Ingress Controller to load balance requests across the companys Kubernetes clusters.

"Before adopting Kong as our API gateway and ingress controller, we had several Elastic load balancers in front of our microservices," said Lisanti. "Now that Kong is handling the load balancing against our microservices and the upstreams behind them, we've been able to remove the majority of our ELBs, with just one currently remaining in production."

"Kong has enabled us to natively manage our microservices within our Kubernetes clusters while removing our legacy load balancing overhead. In partnering with Kong, we have measured a 20% reduction in our overall infrastructure costs," said Lisanti.

Kong Plays a Vital Role in Mercado Bitcoin’s Service Monitoring

analytics in real-time. The team then externalizes Kong's system logs to New Relic in order to quickly scan for any potential incidents that may need to be resolved.

"Kong's analytics capabilities let us have visibility of our environment as metrics per service. This allows us to scale appropriately without going over capacity," shared Lisanti. "Kong elevates the overall monitoring and visibility of our microservices environment, which helps us to not only optimize for costs but is also instrumental in providing us with further insights around our API usage."

Kong also plays a vital role in handling Mercado Bitcoin's troubleshooting particularly when it comes to the team's SEO infrastructure.

"Kong is critical for our troubleshooting process. For our SEO infrastructure, it is very important to identify if we have any broken links in our application," Lisanti explained. "If a scenario arises where a consumer receives a 404 error, we are then able to leverage Kong to see if one of our microservices had possibly crashed and then explore to what extent it had been affected."

"Kong has elevated the performance and reliability of our services within our Kubernetes clusters while also allowing us to streamline our deployment processes across a variety of environments."

João G. Lisanti
Head of Site Reliability Engineering, Mercado Bitcoin

Recommended Case Studies