Dec 21, 2021
#1 women's health app
Flo exists to empower women and everyone who gets a period by giving them a space where they can access the knowledge and support they need to prioritize their health and well-being, with more than 43M monthly active users and 200M downloads worldwide.
Flo started as a period tracking app, which is still a big part of the application. Eventually, Flo evolved into a holistic AI-Powered Super App that includes multiple domains: health, social media, content creation, marketing, etc.
On top of AWS Cloud, with our Data Platform, we process 500TB daily — approximately 1.5B events.
Asynchronous communications and streaming
To be able to effectively integrate domain and process data at that scale, we frequently use asynchronous contracts and streaming at Flo engineering.
Since we need reliable and efficient communication, we have chosen a commit log approach as the main tool for the job and have used both AWS Kinesis and Kafka (AWS MSK).
Kafka (MSK) vs. Kinesis
We have been using AWS Kinesis for years to stream events: It provided us with a high level of reliability and performance. Fortunately for Flo, the number of events and data was growing, but we started to notice unpleasant spikes in latency — up to 500 ms.
For cases when we serve user requests, this is quite painful: According to research, our response time should be lower than 200 ms (p95) and lower than 500 ms (p99), so we made this our performance “North star.”
In the case of edge, customer-facing services 500 ms for transport means we are out of SLO, even for p99. So we started to search for alternatives. Kafka was the best option.
Since we prefer using managed services, we decided to test AWS MSK. We have made several load tests and received tremendous results — Kafka latency is ~ 70ms (p95) and ~140ms (p99).
We have since started migration to Kafka.