Case Studies

Mercado Bitcoin Slots in Kong Konnect to Support Global Crypto Exchange

Get Started with Kong

Results

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 Kong Konnect’s flexible plugin architecture

Challenges

  1. Required a highly secure and performant solution for managing a trading engine that brokers more than 1.5 billion requests per month
  2. Incumbent legacy load balancers required consistent upkeep while driving up infrastructure costs 
  3. Seeking to optimize platform performance and remove the burden from each individual service handling its own rate limiting responsibilities

Solutions

  1. Kong Vitals provided visibility of Mercado Bitcoin’s environment as ‘metrics per service’ and allowed the team to scale appropriately without going over capacity
  2. Configured Kong’s Kubernetes Ingress Controller to proxy traffic, define service routes and load balance requests across the company’s Kubernetes clusters 
  3. Kong’s out-of-the-box plugins allowed for the team to abstract away rate limiting responsibilities from its applications and services

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 early 2021, the company plans to further invest 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.

Mercado Bitcoin Kickstarts its Microservices Journey With Kong Konnect

When Mercado Bitcoin approached a critical growth stage in 2017, 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 Konnect was selected as the service connectivity platform of choice to kickstart the company’s journey towards 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.”

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 that 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 platform’s 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.”

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 ELBs in favor of leveraging Kong’s ingress controller to load balance requests across the company’s 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 Kuberentes 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

“Kong Vitals lets us have visibility of our environment as ‘metrics per service.’ This allows us to scale appropriately without going over capacity,” shared Lisanti. “Kong Vitals elevates the overall monitoring and visibility of our microservices environment, which helps us to not only optimize for costs – it is also instrumental in providing us with further insights around our API usage.”

To monitor the service health of its trading platform, the SRE team uses Kong Vitals to track 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 also plays a vital role in handling Mercado Bitcoin’s troubleshooting – particularly when it comes to the team’s SEO infrastructure. “Kong Vitals 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 Vitals to see if one of our microservices had possibly crashed and then explore to what extent it had been affected.”

Making Sense of Kong Mesh

As Mercado Bitcoin’s decentralization journey progresses, the team would also like to invest in service mesh to help unravel some of the complexities involved with maintaining an ecosystem of distributed internal applications. “Observability, visibility and performance are the main drivers for us to move to service mesh so that we can support the applications responsible for exposing our public APIs – which get around 1 billion requests per month. Because we broker cryptocurrency, zero-trust security is also very important to us,” said Lisanti.

Following the team’s success in implementing Kong to further drive service performance and minimize load balancing costs, Mercado Bitcoin is now eyeing Kong Mesh as the natural next step in the company’s strategy towards achieving end-to-end connectivity across its hybrid cloud environment. “In regards to our service mesh exploration, we would like to first test out Kong Mesh. Since we have all of Kong’s products running internally, it just makes sense for our team to also use Kong Mesh when we begin to implement service mesh for our organization early next year,” said Lisanti.

“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

300+ Enterprise Customers and Counting