By Rachel Brown, Product Manager, and Alex Tamoykin, Tech Lead.
In 2019, Tala’s Product and Engineering teams partnered to solve a number of complex problems for our business and our customers in emerging markets. In this article, we share how a new architectural design helped us drive sustainable growth for the company as well as solve one of our customers’ top pain points.
The new architectural design we built involves SQS queues and AWS lambda functions. We decided to use this design because of several factors:
- Resiliency. Each event has business value, so we wanted to ensure that no events are dropped under heavy traffic. Placing events on a durable SQS queue as they occur allows us to retain them as well as retry delivering them in case of a processing failure.
- Elasticity. One of the main advantages of serverless technology is the ability to use resources on demand. AWS lambdas are only billed at the times when they are invoked.
- Flexibility. Managing events in a queue and lambdas allows us to swap out each component easily, which opens up more possibilities for future use cases.
Case Study 1: Sending post-install data
Like many businesses, Tala’s marketing team uses digital advertising channels to introduce our product to new audiences. Early last year, the effectiveness of Tala’s Facebook and Google ads were being primarily measured by install events (i.e., users who download the app). We quickly identified an opportunity to improve the effectiveness of campaigns by optimizing ads for post-install events rather than downloads.
The marketing team identified several high-priority post-install events, which we set up triggers for on backend services. When an event is triggered, a file is sent to an SQS queue. The lambda function then retrieves this information from the queue and passes it to our marketing platform API. This architecture is much more resilient and accurate than the team’s previous client-side event tracking solution.
Tala’s engineering team designed, built, and tested the new framework over several sprints. Our marketing team then ran a scaled Facebook campaign and realized a significantly higher return on ad spend when optimizing for post-install events compared to install events, in addition to maintaining 100% uptime and data accuracy.
Case Study 2: Preventing fraud
In emerging markets such as Kenya, the second-hand phone market is massive. Consumers are also sensitive to download and storage size due to device and data constraints. Because Tala uses device data (with user permission) to underwrite personal loans, the following is a common scenario:
- Person A installs app on phone and signs up for Tala
- Person A sells phone to Person B
- Person B cannot sign up for Tala on phone
Tala’s legacy device management rules, used to prevent fraud, were blocking tens of thousands of new users per month from signing up and were one of the largest drivers of customer support tickets globally. In addition, this problem had grown 3x in volume over the past 2 years and was expected to continue increasing exponentially the longer the company operated in a given market.
In this situation, we launched a set of new device management rules and a lambda function. The lambda stored a large amount of event data in a predefined format in a Cassandra database. Doing some pre-processing of the data upfront allowed us to achieve constant database lookups to identify the device ownership instantly. We enabled new users to more seamlessly sign up for the app while decreasing customer support tickets related to device issues by 91%.