Performance requirement of Twitter platform?
Simply speaking, end users expect to read & post tweets with a very fast response time and, Twitter is expected to respond in that manner irrespective of load arriving at it with absolutely no room for any slowness, whatsoever. That is a tough one, isn’t it? This is unlike many enterprise business systems where users can be a little forgiving by waiting for the response to show up. So, they needed to have a load testing system which can generate constant transaction load by sending multiple requests simultaneously (based on Little’s law and not concurrent requests) in a floating manner with appropriate given service latency, without really waiting for any response. Simply speaking, what is needed was to model a system where requests arrive independently of the service’s ability to handle them. For example, a fixed load of 100K requests per minute, if required.
What is Iago?
Iago is a load generator tool created by Twitter Engineering team (with moto as Built By Engineers, Built for Engineers) to load tests their 100+ services/APIs which are accessed by clients (users, internal services) using Http, Thrift, UDP & other protocols. At architecture level, Iago consists of feeders and servers. A feeder reads the transaction source. A server formats and delivers requests to the service one wants to test.
Following are some of the key characteristics of Iago:
- Supports arbitrarily high rates of traffic via built-in support for creating clusters. With cluster setup, one could generate in excess of 100K requests per second or more.
- Supports multiple protocols such as following:
- Supports custom request distribution, either in terms of sums of distribution or one’s own implementation
- Extensible in the sense one could extend or replace one or more Iago components with their own components. Iago is written in Scala and can be extended with code that works on the JVM platform.
Use Iago for Testing APIs under Load
If you wanted to do stress testing of your web application, Iago may not be a good fit. You may want to consider other load testing tools for that purpose.
Iago shines when you want to test APIs under load. As per this page, Iago is a best fit for testing API under load. Following are some of reasons:
- Once you are done writing your test client code for accessing APIs, it only takes small amount of code to be written for load testing.
Reference Pages for Iago
- Testing Systems at Scale @ Twitter (GTAC 2013)
- Building and profiling high performance systems with Iago
- Beta Distribution Explained with Python Examples - September 24, 2020
- Bernoulli Distribution Explained with PythonExamples - September 23, 2020
- K-Nearest Neighbors Explained with Python Examples - September 22, 2020