Interações com as vitrines da Chaordic na abertura da Copa

Um desafio quando se trabalha com sistemas de larga escala é visualizar o comportamento desses sistemas em tempo real. Para isso é imprescindível um painel de monitoramento que permita visualizar as principais métricas e tomar ação quando algo não vai bem. Aqui na Chaordic os sistemas são monitorados 24/7 para garantir a melhor experiência com as nossas vitrines de recomendação. Uma das métricas que monitoramos é a vazão do sistema, que permite saber quantas requisições estão sendo atendidas em um dado instante. No nosso caso, essa métrica está relacionada com a quantidade de vitrines mostradas para os usuários nas lojas...…

read more...

Zero-downtime Cassandra upgrade

Two critical requirements when offering a recommendation service to some of the largest Brazilian web stores are availability and scalability. After all, if our service becomes unavailable, the store customers won’t be able to see our recommendations when they shop online, upsetting both the customer and the partners that rely on our service. We take this requirement very seriously at Chaordic, using the latest technologies to ensure our service will be available 24/7/365, including on peak periods such as Black Friday. One of the systems we use for increased availability and scalability is Apache Cassandra. Cassandra is an open source...…

read more...

Saving money on the cloud with Tio Patinhas

About two years ago, we published tiopatinhas “An AWS Autoscaling companion that saves money by using instances from the Spot Market”®. In short, Tiopatinhas replaces half of your autoscaling ondemand instances with instances from the spot market. That allows you to save above 33% of EC2 costs depending on the instance type. Now diving into the details, tiopatinhas is a python script that connects to an autoscaling group, monitors cloudwatch data and spot market information. Based on that information, tiopatinhas decides when to launch or terminate an instance via autoscale. If it detects that your application needs to be scaled,...…

read more...

Metrics monitoring and real time analysis

Every developer needs to know about what is happening inside the application. We are no different and what we do to achieve this is tracing a lot of our data, from low level system stuff to many high level, application specific metrics. In order to collect application data and plot it, since we use autoscaling, we need to aggregate it over time inside the application, send it to a collector and aggregate it again over instances. For that second round of aggregation we use etsy’s statsd with a few modifications of our own to compose metrics. Those modifications are made...…

read more...

Secure CORS support on Nginx

Cross-Origin Resource Sharing (CORS) is a specification that enables client-side cross-origin HTTP requests. This is particular useful for javascript web applications, since most modern browsers do not allow client-side RPCs to domains other than the origin domain. In short, the server wishing to enable CORS should add the Access-Control-Allow-Origin header to its responses, specifying a list of allowed servers, or the wildcard * to allow cross-origin requests from any domains. Enable-cors.org provides a list of server configuration files to enable CORS in different servers. However, the configuration file provided for Nginx does not work out of the box for a...…

read more...

Hello, World!

Welcome to Chaordic Technology Blog. This blog is maintained by Chaordic’s engineers and has the objective of sharing anything related to the technology we use in a daily basis to deliver top quality personalized recommendations to millions of users. Please excuse the somewhat limited interface here, but we plan to take an incremental approach and improve the user experience gradually. The main objective for the moment is to focus on producing quality content to help and entertain fellow hackers out there. We’re using the Jekyll Bootstrap toolkit to serve our content on GitHub Pages. This choice provides a simple and...…

read more...