APIs Performance Testing with Twitter Iago

The article talks about performance testing tool, Iago, which is created at Twitter for testing their core database interfaces, storage sub-systems and domain logic, up to the systems accepting front end web requests.
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:
    • HTTP
    • Thrift
    • Memcached
    • Kestrel
    • UDP
  • 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.


Ajitesh Kumar
Follow me

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com
Posted in Performance Engineering. Tagged with , .

Leave a Reply

Your email address will not be published. Required fields are marked *