Engineering the perfect food – one that is simple, nutritious, and affordable – has been the focus of Rosa Foods since 2013. The company set out to deconstruct human nutrition and identify the essential ingredients that a body needs to maintain optimal health. Taking an approach that blends the precision of science with the iteration of technology, the company folded these nutrients into their flagship product, Soylent, which offers an easy, fast, and cost-effective alternative to traditional food. For many around the world, Soylent can boost health for those who may lack the resources or time to prepare nourishing meals.
Rosa Foods is dedicated to exploring the future of food and creating sustainable alternatives that support the planet. One of Soylent’s long-term objectives is to help scale the world’s food system as the population grows exponentially. Rosa Foods’ engineering team faced a similar challenge with their technology approach. They needed a strategy that would help the company scale their business, from internal processes to e-commerce systems, as demand for Soylent accelerates into the future. In two years, the company has raised millions from crowd-funding and Series A investors, acquired tens of thousands of subscribers, and now ships trillions of calories to customers each month.
Future-Proofing Food Commerce on Heroku
In order to set up Rosa Foods’ for future growth, the engineering team shifted from off-the-shelf solutions to building their ideal technology stack from the ground up. Their new system runs on Heroku and is designed to balance flexibility with scalability and can handle more robust e-commerce activity while allowing them to iterate and roll out new features quickly. The following are highlights of their new stack. For the full story, see John Coogan’s blog post on StackShare.
Running our app on Heroku means we don’t have to worry about setting up and maintaining our own servers. It allows us to focus on building out our stack and iterating our user experience. John Coogan, Co-Founder & CTO, Rosa Foods
Deconstructing a Modern Tech Stack
Starting at the top, the team chose Amazon Route 53, Elastic Load Balancer, and nginx to route traffic to their new web app running on the Heroku platform. They used Heroku Add-on Fastly (which is pre-integrated into their Heroku environment), as well as S3 for content delivery. The e-commerce app was built entirely in Python using Django, and the team has been so pleased with Python’s flexibility that they’ve used it in many other capacities company-wide, including finance, marketing, and product development.
The ability to assist in all aspects of the business with a single programming language has been a huge selling point for Python within our organization. John Coogan, Co-Founder & CTO, Rosa Foods
To optimize response time and scalability, the Rosa Foods team built a work queue system that distributes tasks and data through the system smoothly and efficiently. The system easily handles webhooks from external services, Mandrill by MailChimp API calls for transactional emails and back-end analytics that are tracked in Segment and Google Analytics. Asynchronous, longer running processes are sent to RabbitMQ Bigwig managed via Celery, and the Heroku Add-on CloudAMQP service allows workers to process data over time and bypass the need to scale up servers to manage the load. They also chose Heroku Add-ons IronMQ for elastic message queuing and the MemCachier memcache-as-a-service.
We love how flexible and easy it is to use Postgres. As our business evolves, our data storage capabilities can adapt right along with us. John Coogan, Co-Founder & CTO, Rosa Foods
For data storage, the engineering team has been very happy with Heroku Postgres and the ease with which they could deploy and manage their data, including running back-ups and read-slaves with the click of a button. Heroku Dataclips have been especially beneficial, allowing everyone in the company to run queries and work with real-time data in spreadsheets without any extra support from the development team. The team has since integrated Chartio on top of Postgres with no issues. They chose to complement their Heroku Postgres database with Mongo, using Heroku Add-on services MongoLab and Compose MongoDB.
Heroku Dataclips allowed us to roll out read-only database access to the majority of the company in a manageable way in a matter of days. John Coogan, Co-Founder & CTO, Rosa Foods
Postgres also allows Rosa Foods to store unstructured data in a Postgres HStore or JSON column and create a flexible schema on top of it that can be optimized at a later time, as business needs evolve. This layer of abstraction saved the team valuable integration time.
The team again uses Python to validate, sort, and manage orders before handing them off to ShipWire and the fulfillment process. They’ve worked hard on their fulfillment system, improving it’s ability to catch errors as well as control order flow based on inventory supply and projections.
During development, the engineering team was optimized for speed. They ran everything locally in Docker before deploying to Heroku for staging and production. With Docker, they could quickly on-board new team members and standardize their development environments, allowing them to maintain a fast pace. Along with Github and Slack integration, they also used Codeship for continuous integration and delivery and Rainforest QA for cross-browser testing and build verification. Other Heroku Add-ons include: loader.io for cloud-based load testing, Heroku Scheduler to run scheduled tasks, Deploy Hooks for deployment notifications, and SSL for encryption.
Post-launch, the team uses several Heroku Add-ons to fine-tune their app as their business grows, including Papertrail and Logentries for log management and New Relic APM and Librato for performance monitoring.
With Heroku at the heart of it all, we now have a stable ecosystem of scalable tools and frameworks that work really well for our business. John Coogan, Co-Founder & CTO, Rosa Foods
Customers browsing Soylent.com enjoy a polished, modern web experience that provides a wealth of information on nutrition as well as the science and philosophy behind the product. Purchasing Soylent is as easy as preparing their meal-in-a-drink. Using a simple, single-page order form, customers can make a one-time purchase or sign up for a monthly subscription at discounted prices. New customers receive a starter kit that includes a free pitcher and measuring scoop.
Community involvement in Soylent makes the product even more tasty for their customers. Discussion boards provide ideas and support, and a sizeable DIY section, encourages customers to tinker with the recipe and create their own modifications – their own “soylents” - using the elemental ingredients available for sale on the site. Users can also create and share recipes that are a mashup of Soylent and traditional food, providing endless inspiration for the community.
For busy modern people, staying healthy with Soylent gives them one less thing to worry about.