How Soylent Ships A Trillion Calories Per Month

15,802
Rvpxohpr
Soylent
Soylent is a simple, nutritious, and affordable food that possesses all the essential ingredients a body needs to be healthy.

By JohnCoogan, Cofounder & CTO, at Soylent.


Soylent

Background

Soylent is a simple, nutritious, and affordable food that possesses all the essential ingredients a body needs to be healthy; it’s a convenient powder that is mixed with water and provides a complete meal for those looking for an easy, healthy, and cost-effective option to preparing meals.

The product’s nutritional makeup is comprehensive. It includes protein, carbohydrates, fats, fiber, and vitamins and minerals such as potassium, iron, and calcium. It contains all of the elements of a healthy diet, with limited contribution from less desirable components such as sugars, saturated fats, or cholesterol. The Soylent recipe is based on the recommendations of the Institute of Medicine (IOM) and is approved as a food by the Food and Drug Administration (FDA). The list of ingredients includes oat flour, rice protein, and omega 3 fatty acids extracted from algae. Our custom microvitamin blend provides essential nutrients like vitamin D and folate, and electrolytes such as potassium.

In order to validate demand for the product, we launched a crowdfunding campaign in May of 2013 using Tilt/Open, a white label crowdfunding platform software from a fellow Y-Combinator company. Our initial goal was $100,000, but we quickly went on to raise $3 million and become the largest food-related crowdfunding campaign in history, a title we still hold to this day. Since then, we have gone on to gain tens of thousands of subscribers, release 5 substantial improvements to the product, and raise a $20 million Series A from Andreessen Horowitz to fund our next stage of growth. Our company is now 20 full-time employees and is headquartered in Los Angeles with production facilities in California and Colorado.

I serve two primary roles at the company, CTO and co-founder. As CTO, I lead the engineering team and help build great software to make our company as efficient as possible. As a co-founder, I help out with all the random stuff that naturally comes up in building companies.

E-Commerce MVP

Although we have been working on Soylent for over 2 years now, the engineering team was only one person (myself), until last October. Early on, the business was changing so quickly, we used mostly off-the-shelf software services to accomplish our basic business goals. We launched our crowdfunding campaign on Tilt/Open, fulfilled them using ShipStation, and, after completing our initial product development cycle and fulfilling our initial crowdfunding orders, launched a new e-commerce site using Shopify and ChargeBee for one-off and subscription orders respectively. This allowed us to have a highly front-end design tailored specifically to our brand, while not having to build a proper e-commerce platform. We launched the site in about a month and were able to take advantage of all of the “batteries” Shopify and ChargeBee include in their services. We still had custom scripts to fill gaps in the platforms, but 90% of our problems were solved right out of the box. We selected Shopify because it struck the right balance between ease of use and extensibility. It’s a fully-hosted solution and comes with it’s own CDN already hooked up, but also has a solid API with webhooks so you can start building on top of it quickly. ChargeBee has similar features but specializes in subscription payments. Both are extremely affordable solutions and worked fairly well together during the time we were relying on them heavily.

Current E-Commerce Stack

Now that we have a solid engineering team, we’ve built a system which we believe offers the ideal tradeoff between scalability and flexibility. Consequently, we are now prepared to both handle the next order of magnitude of e-commerce activity while simultaneously rolling out new features quickly.

At the top of the stack is Amazon Route 53 pointed at Heroku’s routing mesh. Separately we have an Elastic Load Balancer sitting in front of a few nginx instances to handle our transition from soylent.me to soylent.com seamlessly. Nginx handles routing all of our subdomains and legacy url structures to our new site and required very little time to setup.

From there, Fastly serves all of our assets over a CDN. Fastly plays well with Heroku and has some nice tunability under the hood that gives us flexibility when we need it. We still use S3 from time to time for larger files that we don’t want to store in our repo, but we aren’t leaning heavily on it. Our core e-commerce app is written in Python and uses the Django web framework. The newer features around data modeling and migration generation have been helpful and we’ve yet to run into a framework issue we couldn’t solve quickly. Django is slightly less popular than Rails for e-commerce apps, but the scientific Python community more than outweighs any Rails specific gains to be had. To date we have used Python in every division of the company and in many different capacities. Finance has used Python to crunch numbers, marketing has used data science toolkits and iPython to understand customer segments, the product team has used PyMOL to create molecular visualizations, and the list goes on. Although e-commerce is the sole channel through which Soylent is available for purchase, we are not strictly an e-commerce company. We are a food company focused on engineering the ideal staple food and to that end, we leverage technology to help us design and deliver the best possible product that has been optimized around several criteria, primarily health, affordability, and convenience. Industry standard tooling for this type of work is sorely lacking and we have had to resort to building our own tools in many cases. The ability to assist in all aspects of the business with a single programming language has been a huge selling point for Python in our organization.

Longer running processes that need to be executed asynchronously are sent to a RabbitMQ task queue managed via Celery. Sending Mandrill API calls for emails, tracking back-end analytics in Segment and Google Analytics, and handling webhooks from external services all flow through our queue-worker system which has helped keep the app snappy on very limited hardware. It requires some thoughtfulness when designing how data will flow through the system, but ultimately pays off in responsiveness and scalability. It’s not uncommon for us to receive huge gluts of POST requests to our webhook receiver endpoints as data changes on counter-party systems and we need to be able to perform a non-trivial amount of work on each payload. CloudAMQP, which serves as a RabbitMQ as a service, has absolutely no problem handling the data and then our workers can process everything over time, obviating the need to scale up web servers to handle the load.

For persistent data storage, we use PostgreSQL and couldn’t be happier. The deployment and management on Heroku couldn’t be simpler. Back-ups and read-slaves are available at the click of a button, and the benefits of Heroku’s Dataclips product cannot be emphasized enough. 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. Everyone in the company was able to start running queries and working with real-time data in spreadsheets with no ETL process or glue-code typically required for reporting. We have since rolled out Chartio on top of Postgres and had no problems at all with any of the usual frustrations that come up when using business intelligence tools.

Perhaps the biggest benefit of Postgres has been the flexibility to mix in non-relational, key-value data as necessary. Due to our reliance on 3rd party systems early in our company history we have a lot of unstructured data floating around. We obviously want to store the data and make it accessible for the long term, but we don’t always know what we will need to do with it later, and don’t want to waste time trying to design the perfect schema around it. By dumping this data into either a Postgres HStore or JSON column, we can safely store the data, and even create a synthetic schema on-top of it as needed using views. As our data needs evolve and the business goals become clearer, we can dive a level deeper to optimize the schema and apply structure to the non-relational data without breaking any of the current uses. This layer of abstraction allowed us to complete a fairly sizable multi-system integration in only a few weeks.

Processing and fulfilling orders is handled through several Python scripts which validate, sort, and transform orders as necessary before posting orders to ShipWire’s API. Our fulfillment system has evolved over a couple iterations to be much more precise and flexible, ensuring that we catch any errors before orders go out the door, while still letting our operations team control order flow on a fairly granular level based on inventory supply and projections. We recently blogged about our initial order fulfillment system, and I highly recommend reading it for a comparison.

DevOps & Workflow

When working on the project, everything is run locally in Docker and then deployed to Heroku for staging and production. Docker has simplified on-boarding new engineers and completely standardized our development environments. We aren’t using it in production yet, but I wouldn’t be surprised if we started to soon. In addition to testing locally in Docker, we use CodeShip for continuous integration and deployment. The GitHub and Slack integrations are rock solid and it’s really sped up development. We also use Rainforest for QA as a service to run real-world tests on our site. This has helped immensely with cross-browser testing and helped us verify the end-to-end functionality of each build.

Looking Ahead

As we move forward, we’re fortunate to be pleased with our engineering structure and project workflow. Building this system from start-to-finish took months and we have lots of new opportunities on the horizon. We now have a fairly stable ecosystem of tools and frameworks that work extremely well for our business and contribute to efficient and effective software development. We hope that by offering a peek into the inner workings of our company, we can receive thoughtful feedback on what we can do better and prepare for the future. If you want to build software for the future of food, join us! We are open to candidates with a variety of backgrounds and experience levels. You can view open positions at jobs.soylent.com.

Rvpxohpr
Soylent
Soylent is a simple, nutritious, and affordable food that possesses all the essential ingredients a body needs to be healthy.
IT Manager
Los Angeles
Summary of position This role will be responsible for managing resources and processes required to design, plan, and support all information products and services in a mostly outsourced technology environment. Research and evaluate new technologies to be used as enhancements or upgrades to existing server, network, and other IT infrastructure equipment.Prepare, maintain and keep updated IT procedures and documentation related to our processes and platforms operations. Supervise, hire and train a small technology team. _____ Rosa Foods, the maker of Soylent and Coffiest, is a pioneer in food technology producing healthy, functional foods that are good for the body and the planet. In 2013, Founder and CEO Rob Rhinehart developed the first iteration in his kitchen after recognizing the need for a simpler, more efficient food source. Soylent uses science and technology to solve the challenges plaguing the current food system and work toward its mission of providing access to quality nutrition to people across the globe. With its rapid expansion over the last four years, Soylent’s suite of products has grown beyond its original Powder (now on version 1.8), to ready-to-drink meals in 2015, flavor extensions, and its debut on Amazon Launchpad in 2016. Although available primarily online at Soylent.com and on Amazon, Soylent recently announced its first foray into traditional retail with 7-Eleven in the Greater LA and Austin areas - the first major step in its retail distribution plan. Soylent's innovative products include the original Powder and 14oz Ready-to-Drink bottles available in Original, Cacao, Cafe Coffiest, Cafe Vanilla, and Cafe Chai. Rosa Foods believes in managing the Company and the product by never being complacent and staying on the cutting edge of food technology and nutrition. Working at Rosa Foods you'll have a platform to build cool things that positively affect the world with fun and dedicated people. We also have raised over $75M in funding from Google Ventures, Andreessen Horowitz, Lerer Ventures, and Y-Combinator. This enables us to offer the benefits of a larger organization while still maintaining the best qualities of a startup. You’ll be able to help grow our small creative team and contribute your ideas to build this exciting brand and change the way people think about food. Rosa Foods is headquartered in Los Angeles, CA.
  • Build, gain buy-in to and implement a comprehensive Information Technology strategy which will keep pace with current and projected growth
  • Maintain organization's effectiveness and efficiency by defining, delivering, and supporting strategic plans for implementing information technologies
  • Oversee the development, design, and implementation of new applications and changes to existing computer systems and software packages
  • Manage all vendor relationships, including selection, negotiation, KPIs
  • Provide all aspects of line management, including hiring, mentoring, performance reviews
  • Work with all departments to prioritize initiatives which map to overall company objectives
  • Prepare and manage budgetsMaintain security and privacy of the information systems, communication lines, and equipment
  • Recommend information technology strategies and procedures by evaluating outcomes, identifying problems, evaluating trends, and anticipating requirements
  • Prepare and manage budgets
  • Bachelor's degree in the field of computer science, engineering or related field is preferred
  • Minimum of 3 years of experience in a Senior Administration role
  • Minimum of 4 years of experience as IT Manager
  • Must be highly organized and proficient with G Suite; experience with ERP (Netsuite) and AWS a plus
  • Must possess excellent written and verbal communication skills
  • Must be a good problem-solver with ability to think logically, problem solve, make effective decisions
  • Amazing Health, Dental, and Vision benefits
  • Life insurance and disability benefits
  • 401(k)
  • Flexible work hours
  • Unlimited snacks, drinks, and lunches
  • Beautiful creative office in the heart of DTLA
  • Competitive salary
  • Some more serious perks we would love to share in detail
  • Comments
    Open jobs at Soylent
    Software Engineer
    Los Angeles
    Soylent is a pioneer in food technology, delivering nutritionally-complete staple meals that provide all the essential nutrients required to fuel the human body. Soylent believes in managing the Company and the product by never being complacent and staying on the cutting edge of food technology and nutrition. Working at Soylent you'll have a platform to build cool things that positively affect the world with fun and dedicated people. We value continuous learning, continuous improvement, and a scientific approach to problem solving. We are able to learn from existing models and methodologies but are not constrained by them. Soylent is produced with sustainability and efficiency in mind to create a convenient, nutritious, and affordable meal that is better for our health and the environment. CEO/Co-founder Rob Rhinehart and team developed Soylent after recognizing the need for a simpler, more efficient food source. The company is headquartered in Los Angeles, CA. We try to be as language agnostic as possible, choosing to work with the best tools and languages for the job (Although we really like Python and JavaScript). Scaling to meet consumer demand for Soylent will require engineers with knowledge in diverse areas such as building out our internal dev-ops tools or working closely with UX designers and frontend engineers to create great software experiences.
  • Design and develop software with high level scripting languages like Python, JavaScript, etc.
  • Integrating with existing databases and APIs for payments and shipping
  • Building internal APIs for use by our frontend clients
  • Selecting frameworks, packages, and services 
  • Securing the data and privacy of all of our customers
  • Site analytics and usability testing
  • Working closely with UX designers, internal stakeholders, and 3rd parties
  • Ownership of deployment pipeline, Developer tooling, and testing tools
  • Desire to build software using Lean/XP/Agile/DevOps principles and methodologies
  • Works collaboratively, is an open and effective communicator
  • Amazing Health, Dental, and Vision benefits
  • Life insurance and disability benefits
  • Relocation support
  • 401(k) 
  • Flexible work hours
  • Beautiful creative office in the heart of DTLA
  • Competitive salary and equity package
  • Some more serious perks we would love to share in detail
  • Meaningful work - Giving customers 1,000’s of extra hours they would’ve spent eating
  • Work/life balance - We understand burnout is real and the makers/managers schedule
  • Interesting people - We embrace unique and diverse backgrounds
  • Working with the best - Hardware, software, and people
  • Engineering culture starts at the top - Rob, the CEO, is a software engineer
  • A constant learning environment - Dedicated time devoted to learning new things
  • IT Manager
    Los Angeles
    Summary of position This role will be responsible for managing resources and processes required to design, plan, and support all information products and services in a mostly outsourced technology environment. Research and evaluate new technologies to be used as enhancements or upgrades to existing server, network, and other IT infrastructure equipment.Prepare, maintain and keep updated IT procedures and documentation related to our processes and platforms operations. Supervise, hire and train a small technology team. _____ Rosa Foods, the maker of Soylent and Coffiest, is a pioneer in food technology producing healthy, functional foods that are good for the body and the planet. In 2013, Founder and CEO Rob Rhinehart developed the first iteration in his kitchen after recognizing the need for a simpler, more efficient food source. Soylent uses science and technology to solve the challenges plaguing the current food system and work toward its mission of providing access to quality nutrition to people across the globe. With its rapid expansion over the last four years, Soylent’s suite of products has grown beyond its original Powder (now on version 1.8), to ready-to-drink meals in 2015, flavor extensions, and its debut on Amazon Launchpad in 2016. Although available primarily online at Soylent.com and on Amazon, Soylent recently announced its first foray into traditional retail with 7-Eleven in the Greater LA and Austin areas - the first major step in its retail distribution plan. Soylent's innovative products include the original Powder and 14oz Ready-to-Drink bottles available in Original, Cacao, Cafe Coffiest, Cafe Vanilla, and Cafe Chai. Rosa Foods believes in managing the Company and the product by never being complacent and staying on the cutting edge of food technology and nutrition. Working at Rosa Foods you'll have a platform to build cool things that positively affect the world with fun and dedicated people. We also have raised over $75M in funding from Google Ventures, Andreessen Horowitz, Lerer Ventures, and Y-Combinator. This enables us to offer the benefits of a larger organization while still maintaining the best qualities of a startup. You’ll be able to help grow our small creative team and contribute your ideas to build this exciting brand and change the way people think about food. Rosa Foods is headquartered in Los Angeles, CA.
  • Build, gain buy-in to and implement a comprehensive Information Technology strategy which will keep pace with current and projected growth
  • Maintain organization's effectiveness and efficiency by defining, delivering, and supporting strategic plans for implementing information technologies
  • Oversee the development, design, and implementation of new applications and changes to existing computer systems and software packages
  • Manage all vendor relationships, including selection, negotiation, KPIs
  • Provide all aspects of line management, including hiring, mentoring, performance reviews
  • Work with all departments to prioritize initiatives which map to overall company objectives
  • Prepare and manage budgetsMaintain security and privacy of the information systems, communication lines, and equipment
  • Recommend information technology strategies and procedures by evaluating outcomes, identifying problems, evaluating trends, and anticipating requirements
  • Prepare and manage budgets
  • Bachelor's degree in the field of computer science, engineering or related field is preferred
  • Minimum of 3 years of experience in a Senior Administration role
  • Minimum of 4 years of experience as IT Manager
  • Must be highly organized and proficient with G Suite; experience with ERP (Netsuite) and AWS a plus
  • Must possess excellent written and verbal communication skills
  • Must be a good problem-solver with ability to think logically, problem solve, make effective decisions
  • Amazing Health, Dental, and Vision benefits
  • Life insurance and disability benefits
  • 401(k)
  • Flexible work hours
  • Unlimited snacks, drinks, and lunches
  • Beautiful creative office in the heart of DTLA
  • Competitive salary
  • Some more serious perks we would love to share in detail
  • You may also like
    E-Commerce at Scale: Inside Shopify's Tech Stack
    How SendGrid Scaled to 40 Billion Emails Per Month
    How Stream Built a Modern RSS Reader With JavaScript
    How Heap Built an Analytics Platform that Auto-Tracks Every User Event