Meet Anil Goel — the architect behind Hike messenger and Oyo’s scale
Anil Goel architected the online subscription business for Real Networks which grew to become a $500-million business much before Netflix. He built Hike messenger from scratch and then Amazon transportation system before moving to Oyo to rebuild its architecture to support its massive scale.
Dr Grant: I have a theory that there are two kinds of boys. There are those that want to be astronomers, and those that want to be astronauts. The astronomer, or the palaeontologist, gets to study these amazing things from a place of complete safety.
Erik: But then you never get to go into space.
Dr Grant: Exactly. That's the difference between imagining and seeing: to be able to touch them. And that's... that's all that Billy wanted.
Remember this dialogue form the movie Jurassic Park? Our Techie Tuesdays’ star of the week, Anil Goel, not only remembers it too well. He says, “I’m more of an astronaut than astronomer.” In fact, he believes that had he grown in the US, he would have probably dropped out of college.
Anil is now the CTO of Oyo, one of the largest startups in India. Prior to this, Anil led overall technology strategy, architecture, development and technical operations for Amazon’s multibillion dollar worldwide customer returns and reverse logistics business. Earlier, he built the Hike messenger platform from the scratch which scaled to more than ten million users in a year. But his introduction to the world of scaling up took place at Real Networks, Seattle, where he built its online subscription business (yes, much before Netflix) and scaled it to a $500- million business in nine years.
The first impression Anil makes is that of a guarded tech genius who is a man of few words. But wait for a while, and as the conversation starts flowing, you’ll find yourself running short of time.
Here’s an account of his journey which started from a small town in Haryana and moved towards building some of the largest global tech systems.
The homesick boy from Gohana
Anil was born in a small town in Haryana called Gohana. He has a younger sister and an elder brother. His father was a teacher in a convent school and mother was a housewife. He was pretty close to his family and recalls an incident, “When I went to a nearby bigger town Sonipat to study in Class 9, I felt homesick and came back to Gohana.”
As a kid, Anil was always fascinated with building things. Science-Maths was an obvious choice for him, given his natural interest. He graduated class 10th from Haryana board and scored among the top 50 (from the 200,000 students who appeared for the exam) and later got the fifth rank in class 12th Haryana state board. All through his school life, Anil wasn't exposed to computers and it was only when he went to BITS Pilani in 1991, he saw a computer for the first time.
Out of comfort @ BITS Pilani
Anil chose to study Electrical and Electronics Engineering (EEE) at BITS Pilani. He recalls his early days, “Suddenly I was thrown out of my comfort zone. It was the first time I was exposed to different cultures. Pilani was very cosmopolitan. Till then, I was satisfied with rank 1. Coming to BITS, I decided to go for more than just chasing rank 1.”
In the beginning, Anil’s focus was on EEE, but he soon he started exploring other streams (through extra courses) including Humanities, Biology and Computer Science. He says, “What fascinated me about computers was how you could control a lot of things around you while just sitting at your desk.” By the end of his second year, he had made up his mind to work on software. He learnt PASCAL and C programming in the first two years and helped the college develop multiple software programs for events. He was also involved in several co-curricular activities and spent a good amount of time managing events.
While at BITS Pilani, Anil interned at Nucleas Software where he built an end-to-end Hospital Management software which was implemented across hospitals.
Looking back, Anil considers the following as the best of what BITS Pilani had in store for him:
- Lifelong friends. Twenty-three years later he’s still well connected with many of them who are closer to him than his family.
- He learnt how to be more independent, confident, and extroverted.
- He learnt the importance of ownership.
The dream job
In 1995, Tata Consultancy Services (TCS) was the dream company for most of the students across the premier institutes in India. Even with a relatively modest CGPA of ~7.5, Anil landed the TCS job on Day 0 of campus recruitments. He worked for TCS for two years, and helped them implement an ERP product at Escorts Group in Faridabad. TCS had exclusive partnership with Avalon (product similar to Oracle database) and had access to their code base so they could customise it for their client needs. Anil worked on various extensions and customisations as a part of a 20-member core software development team. He grew to lead modules and product over the two years. The tech stack of his project was Oracle databases in the backend and Oracle forms and reports in the front end. It was still client server architecture.
USA – the place to be in
By mid 1997, Anil started realising that if he wanted to build things which would have a bigger impact, then the US was the place to be. In India, the scope for real innovation in software was fairly limited. So, he moved to the US in 1997 and joined Capgemini where he worked on some consultancy projects for three years. In the first year, he was on the East coast, and then moved to Seattle to work on projects at AT&T and the Great American Insurance Company (GAIC). Though all these roles were primarily of a software engineer, Anil’s interest was to understand the business and see how software could help that. The tech stack of his projects included Oracle database or some other database in the backend, and client server architecture.
At AT&T, he was a part of the team managing their roaming management system and at GAIC he worked on equipment (heavy equipment) leasing product, tracking and insuring the entire process. He slowly started to have an itch to be a part of the internet revolution. However, he was not specifically looking to join a startup. He says, “My interest was always in building things and to me it wasn't important whether I started my own company or built something for others as long as what I was building was meaningful.”
You may also like - Meet Mitesh Agarwal—the 'brain' of BITS who’s heading technology at Oracle India
The ‘Real’ innovation – online subscription business
According to Anil, Real Networks was one of the coolest companies to work for, in those days. Real had invented audio and video for the internet. Anil chose to join Real Networks in Seattle. Though it was a fairly large (almost 1,000 members) company, Anil joined it as a part of a group which was incubated within Real Networks. He adds, “So, it was the best of both worlds – I could build things from scratch and experiment and at the same time I had the financial backing of a larger company.”
The four to five member team was chartered to build an online subscription business (similar to what Netflix is today for movies). They wanted to see if they could build a business wherein premium content providers (and news companies) could monetise the content. Anil played the role of product manager and architect. There was no online subscription in those days, so he based his learning on how cell phone providers and cable industries were handling subscriptions.
In the first six months itself, he built and launched three to four subscription products where typically a consumer paid $10/month. Anil says, “We needed technology for selling the subscription, managing the subscription life cycle, delivering the content for customers, honouring the content license rights. It was a fairly complex system. This was my first full foray into internet.”
Real had 300 million users who installed Real Players. The company converted them all to free subscribers; thus, giving the opportunity to convert them to paid subscribers later on. Anil built the web-scale architecture using Java, J2EE, relational databases in the backend and number of caching and queueing systems. It was a fairly sophisticated architecture. Anil adds,
We took a scrappy approach because we didn't know how this business would turn out. I'm very pragmatic that way. I would not build an ideal system that nobody will use and would rather build systems which are used every day, and learn from the users.
The first product prototype (of subscription business) was launched in two weeks with Anil being the only engineer in the team. He made a choice to go ahead with the launch with only two components - to purchase the subscriptions and be able to use the content user has subscribed to. But since the billing cycle was monthly, he had another 30 days to build the billing system (and launched without it). Anil adds,
I believe – move fast and build the right products. MVP means minimum viable product and not minimum viable quality.
Scaling to $500-million business
The subscription product saw some good traction in the beginning because of Real’s huge existing database (of users who downloaded Real Players). They got 3,000 paid subscriptions per day which made the subscription business one of the biggest e-commerce companies in the US within the first week. Over the next six months, Anil still worked in a hyper-agile pragmatic mode. The team continued its focus on acquiring more content and increasing their consumer base knowing that they would have to do some amount of re-architecture at a later stage.
In the first 18 months, Real’s online subscription business had launched around 50 different subscriptions and went from zero to becoming a $200 million business (almost 50 percent of the company at that time). It was all achieved with only a 10-member engineering team led by Anil. At that time, Anil took an ambitious initiative to rebuild a very flexible subscription system that could handle all kinds of complexities (music, games, videos, news subscription). When he looked outside for inspiration, he found large subscription management applications such as portal software which were optimised for large volumes (users), but there were very few subscriptions (content). There was WebSphere Commerce; however, that was made for one-time sale.
Anil then led the initiative to build the next generation subscription system for the company. It was a six-month project with 15-16 engineers dedicated to it. They migrated all their subscriptions to the new architecture. Anil recalls, “Internally we used to call it the eBay of subscription. Any content provider could use our platform to create their subscription and monetise it and we would do the end-to-end management.”
Over the first five years, Real Networks built the online subscription division into a $500 million-dollar business with more than 5 million users and 300 plus subscription packages. During that time, all major sports leagues, TV shows and other premium content were on Real's platform. By the end of five years, Anil had a team of 50 engineers. At that time, there weren’t many subscription products which scaled to this level, so IBM’s (which had WebSphere commerce) interest peaked in this business and it got into discussion with the team to acquire the product. The two teams couldn't agree on commercials and the deal didn't go through, but it was a big validation, according to Anil.
No cloud. No problem.
Anil stayed for four more years at Real Networks. He then took additional responsibilities of all of Real's free experiences as well -- real.com, rhapsody.com (later on Napster), real games.com, and a number of other properties. Until that time, all free properties of Real had static experiences, so Anil rearchitected entire systems to make them more content-driven CMS experiences where users and content operators could control the experiences. He shifted from RXML (Roxen docs) to Java, J2EE based systems and built a dynamic flow management technology (similar to what is Spring framework today). He built dynamic flow rendering engine which can use XML to configure pages, branches, content and good amount of customisation. He even got a patent on that.
This was the time when cloud storage was yet to come. In order to handle sudden web traffic (in some cases) and in absence of cloud storage, Anil architected Real’s data centres in a way that dynamically each system could get reconfigured. He explains,
If I see traffic spiking on content consumption side, then our billing systems will automatically reconfigure themselves as content delivery systems. I can wait for a day to bill my customers but I don't want any customers to not have content when they need. Similarly, when the sign ups spike, many analytics systems could dynamically configure to become sign up systems. So, we had our own version of auto-scaling which was quite intuitive.
Back to consultancy
In 2009, after nine years at Real Networks, Anil joined Capgemini as National Practice co-director for their open source technologies and guided a 1,500 people practise across the country. The reason to join Capgemini for Anil was an opportunity to work as an advisor to the CTO at Expedia. Anil helped them change to a service-oriented architecture, and move from waterfall development model to agile development model.
At Capgemini, Anil was missing building something on his own, so he joined HyperQuality. It was a BPO-focussed on call centre monitoring at that time but wanted to become a software company and develop software as a service. He built a call centre monitoring and analytics product called ClearMetrics. This product became number one in its category within two years. This was all based on Java, J2EE, set of caching systems, MySQL as databases and open source stack. Since, the team was partly in Seattle and partly in Gurgaon, Anil had to spend half the time in each city. Initially, he was managing technology for the company and later on handled the product as well. Three years down the line, the company got acquired by the Seattle-based Spoken communications. After helping them with transition, Anil was keen to move back to India (after spending almost 15 years in the US).
Back to the roots
Anil came back to India in mid-2012 and met Kavin Bharti Mittal, Founder and CEO of Hike. He joined Hike as CTO and built the original product from scratch and it grew to more than 10 million users. At Hike, both Anil and Kavin were fascinated by the idea of building a company out of India which culturally resembled a West coast technology company in the US.
Hike was a zero to one journey for Anil. He says, “We knew that messaging is a very high-volume use case, so the system had to scale to very large volumes.”
Anil used MySQL for managing customer profiles, MongoDB for managing messages, Hadoop and Hive for analytics. On the application side, the queueing systems were the backbone of Hike as messages would propagate from one point to another. Anil opted for queueing technology called HornetQ (Kafka wasn’t there yet). On application server side, it was all Java J2EE based three-tier architecture meant for internet and mobile. Redis was used for caching. Anil adds,
Latency has to be really low in messaging so that conversations between the users should seem natural. We made sure that everything is processed and out to the user in less than 100 milliseconds. In our first year, we were doing more than 1 billion messages and 10 million plus install base.
With great features comes great complexity (of architecture)
Lots of features in Hike were quite different than that of WhatsApp. WhatsApp was very well optimised for one-to-one chats and group messaging, keeping messaging very simple. On the other hand, Hike wanted to become a platform (similar to WeChat). Hike had status updates (which was introduced recently on WhatsApp), stickers, emojis, privacy chats (password protected chats) and many other innovative features early on. Hike was the first system which did end-to-end SSL on messaging. Because of that (and as Germans respected privacy a lot), it became very popular in Germany even without marketing. Germany became its second largest user base after India.
All this made architecture a lot more complex. Anil adds, “The amount of information we were processing was much higher over the network. We had to become much more optimised in storing and retrieving some for the rich content (videos) quickly. Even at that scale, we were starting to see that growing infinitely might be a challenge so we started looking at other technologies such as Erlang (we knew WhatsApp was suing it).”
Following are some of the key challenges at Hike for Anil:
- Keeping it very simple but powerful.
- Finding that top one percent of tech talent and attracting them to an early-stage company.
- Building very fast but keeping in mind the massive scale.
- It was also the time when India was the next frontier for many companies such as Line, WeChat, Viber. So, he had to make sure that Hike was number one or two among all the competition.
The big opportunity
According to Anil, leaving Hike was definitely the toughest career choice he has made. He says, “Amazon had this opportunity where they wanted to move away from third party transportation network like UPS, FedEx, to build an in-house transportation network. They were already at the scale where they were operating in tens of billions of dollars. Disrupting an industry of that scale (and which was hundreds of years old) was a compelling opportunity.”
Anil joined Amazon as Director of Engineering in transportation engineering group in Hyderabad. He managed a large part of Amazon’s transportation technology; built lot of foundation of their transportation technology network which enabled the company to do its own ground fleet, last mile delivery; ocean and air fleet. Overall, he played a significant role in building Amazon logistics networks.
Amazon had a lot of technology in place for carrier assignment, tracking, providing visibility to the customer about packages' location. Anil inherited a lot of those systems and grew them significantly. He also worked on building the other part of the system which was to operating a transportation network yourself, having your own fleets to do long distance movement, and last mile delivery. All this made the transportation system a hybrid network as there could be a combination of using carrier or in-house network.
The new Amazon transportation system
In order to ensure that systems are extensible, Anil spent a lot of time on making sure there was right abstraction, and on understanding what different services were, how they interacted with each other, and what the right level for modelling was. All the systems were already running on service-oriented architecture.
During his first 18 months at Amazon, first version of last-mile delivery system and management system for long distance movement trucking fleet had come out along with a considerable development in the first versions of air and ocean operations management systems.
After 18 months, Anil switched roles and took the overall responsibility of customer returns and reverse logistics technologies worldwide which was again a multi-billion-dollar business. He was the CTO for that business. The return system was more arcane at Amazon and had developed as a monolith long time ago. So, Anil moved it to document- based service architecture. He helped build returns as a platform which also gave the company an ability to handle returns for potentially non- Amazon sales as well.
Moving on – to the unfinished task
When Ritesh Agarwal, Founder and CEO of Oyo, reached out to Anil, he saw an opportunity to build a global disruptor out of India. Anil started as a CTO of Oyo and he is now running overall technology and product for the company.
Soon after joining Oyo, Anil realised that the company had many smart engineers, was moving very fast but the systems weren't sustainable. Overall system architecture was monolith and he could see a few cracks in it. So, in the last 18 months, he has entirely rebuilt the full tech stack based on micro services architecture. Anil adds, “We'll have hundreds of services soon. We've rebuilt consumer products on much more scalable technology foundations.”
At Oyo, Anil has played the role of Chief Architect. Oyo tech stack was based on Ruby on rails which gives great speed (made sense in early stage) but was starting to push boundaries in a lot of areas. So, Anil moved the whole new stack to Java J2EE based one. The team is building systems in much more extensible manner so as to handle scale. They are using Spring Boot as a framework, Kafka for queueing, Redis for caching, Hive and Hadoop for data warehousing, MongoDB and MySQL for database. Oyo is investing heavily in AI, ML and IoT. Anil adds,
We're using machine learning for dynamic pricing while AI and NLP have good use cases in customer services. IoT is a big area for us where the guest experience can be significantly improved using Amazon Echo. We can save electricity, enable unassisted check-ins with smart locks. There are many other areas where IoT can help us a lot.
Rearchitect, rebuild, and reorganise
When Anil joined, there were 100 engineers without even a single engineering leader. So, he decided to reorganise the team (similar to Amazon's two-pizza team model) where the team has end-to-end ownership of functional charters. Today, Oyo has more than 30 technologies teams with many technology leaders. The company has gone through talent refresh, team reorganising and product organisation, and the rebuilding of the entire tech stack.
In last 18 months, Oyo launched Oyo Townhouse -- its first fully managed product; travel packages; conference and banquet halls. Besides, it is working on many more products to be launched soon. Anil believes that this is a paradigm shift, not just from technology point of view but from the way of building products (within the company) as well. Oyo opened a development centre in Hyderabad about six months ago and already has a sizeable team there. Anil shares his thoughts on the Bengaluru development centre, “Bengaluru is a natural choice for us, so it's not about if but when.”
Global product from India
Oyo went international a few months ago and now operates in Malaysia, Nepal and China as well. Anil says, “We choose countries who have similar challenges/problems and sizeable market opportunities. So, wherever we can improve hospitality or real estate through technology, we go after that market.”
Oyo is operating in China in a small mode (with a team there). The company wants to operate there as an indigenous Chinese business and make some other changes to its approach in order to succeed. According to Anil, having a local talent and R&D centre was important. The company is not a known entity in China yet, so getting the top-notch talent from the likes of Alibaba and Baidu is a big challenge right now. Anil adds, “China is a much more evolved market, so it has bigger technology needs as well. For example, in China the managers are much more tech savvy unlike India; therefore, we're building products like housekeeping apps to suit them.”
Challenges at Oyo
According to Anil, following are the most important technology challenges in hand at Oyo:
- Building systems which will support number of products that the company doesn't even understand today and building them in a manner which is infinitely extensible. Anil says, “We might do co-working spaces or long stays which are totally different, so the challenge is to build the systems which are extensible enough but without having to invest in those use cases right now.”
- Building systems which are infinitely scalable.
- Continue to attract the top talent who can make those systems.
Technology changes very fast, so Anil looks for the learning ability and aptitude in people while hiring. He also looks for their problem-solving ability and structured thought process.
Apart from these, Anil evaluates candidates based on the following two aspects:
- Ownership - how do they do their new job? Anil prefers people with an attitude – ‘anything and everything coming between me and my job is my job and I'm not going to be limited by my title, team, role, etc.’
- Pragmatic - people who know how to build great things and move faster at the same time.
Personal and professional values
Anil believes in simple living and high thinking. He makes decisions which give him some satisfaction and he hates hypocrisy. He values privacy and individuality a lot. He believes in ‘work hard but play harder’. He is an outdoor enthusiast and loves extreme sports. He is an active participant in long distance running, 200 km cycling, and is currently preparing for a triathlon.
At a professional level, Anil keeps the following key values very close to himself:
- Belief in meritocracy - He expects very highly from himself and from his team
- He believes in this Jeff Bezos’ statement and applies the same to his team, "You can work long, hard or smart, but at Amazon.com you can't choose two out of three"
- He focuses on constantly raising the bar and prefers individuals with a sense of ownership
- Constant renewal and disrupting yourself because if you don't do it then someone else will make you irrelevant.
- Move fast, build great things (and deliver delight)
- If you believe everything is in control, then you're not moving fast enough
- Good ideas are enemies of great ideas
- Problems before solutions
- Nothing is sacred - He challenges the status quo all the time
What does the future hold?
For Anil, technology is the means to make lives better. He believes that right now, he’s in a mode where he still feels young; it’s like day 1 for him where he wants to keep building things and keep driving disruptions and keep doing things which make millions of lives better. After a decade or so, he wants to take upon the full-time role of giving back to the society. His natural interest is in education and empowerment as he’s a big believer in — 'Don't give someone fish, instead teach them how to fish’.
You can connect with him on LinkedIn.