Performance

Load testing using K6

Introduction Understanding the performance of mission critical API is crucial. Before you deploy your API, probably you want to know, how your API behaves under heavy loads. Most API nowadays are HTTP-based, and that’s why there are numerous HTTP load testing tools available. Here is just a few: wrk wrk2 vegeta locust hey Apache Benchmark Problem Most of them designed to generate load on the static url, like:

Function Memorization in Go

Memoization is an optimization technique used to increase performance by storing the results of expensive function calls and returning the cached result when the same input occurs again. In this post I show how function memoization can be implemented in Go, in a pure functional manner. Based on wikipedia definition, a function may be considered a pure function if both of the following statements about the function hold: 1. The function always evaluates the same result value given the same argument value(s).

Enhance Hadoop MapReduce Speed for small jobs

Introduction There are some circumstances when input of Hadoop’s MapReduce is relatively small. Consequently the overhead of allocating and running tasks in new containers outweighs the gain to be had in running them in parallel, compared to running them sequentially on one node. Such a job is said to be uberized, or run as an uber task. Enable uber optimization To enable uberized job, simply set mapreduce.job.ubertask.enable to true. But that is not sufficient.