# The Architectural Transformations of Building Corvid

- Speaker: [Yoav Abrahami](/wiki/speakers/yoav-abrahami.md)
- Event: [Reversim Summit 2020](/wiki/years/2020.md)
- Video: https://www.youtube.com/watch?v=n3z7u79VSkM
- Transcript: [/transcripts/2020/03-n3z7u79VSkM.md](/transcripts/2020/03-n3z7u79VSkM.md)
- Language: Hebrew · Type: talk · Level: advanced
- Topics: [Infrastructure](/wiki/topics/infrastructure.md), [Scalability](/wiki/topics/scalability.md), [Architecture](/wiki/topics/architecture.md), [DevOps](/wiki/topics/devops.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker shares the architectural evolution and scaling journey of building a serverless development platform for millions of web applications over several years. The talk covers the transition from relying on third-party cloud solutions to building a custom container pool, optimizing database structures for long-tail usage, and eventually migrating to Kubernetes. Through these transformations, the speaker emphasizes the importance of building for current scale rather than over-engineering prematurely. The audience learns practical strategies for handling cold starts, tenant isolation, and architectural refactoring.

## Key points

- [1:11](https://www.youtube.com/watch?v=n3z7u79VSkM&t=71s) The speaker introduces the product as an integrated development environment providing backend serverless capabilities and database management directly inside a website builder.
- [4:28](https://www.youtube.com/watch?v=n3z7u79VSkM&t=268s) An early attempt to use a pure client-side proxy failed due to the complexity and variability of authentication protocols across different third-party APIs.
- [11:59](https://www.youtube.com/watch?v=n3z7u79VSkM&t=719s) Relying on standard cloud provider containers resulted in unacceptably high cold start times, leading to the creation of a custom warm container pool.
- [17:59](https://www.youtube.com/watch?v=n3z7u79VSkM&t=1079s) The first custom grid architecture achieved a cold start time of 70 milliseconds by pre-warming containers and injecting site code dynamically upon allocation.
- [25:59](https://www.youtube.com/watch?v=n3z7u79VSkM&t=1559s) Database scaling challenges for millions of sites were solved by creating a hybrid model distinguishing between multi-tenant and single-tenant collections based on usage curves.
- [37:59](https://www.youtube.com/watch?v=n3z7u79VSkM&t=2279s) To support enterprise-grade traffic and stricter regulatory demands, the compute layer was eventually migrated to Kubernetes using a supervisor proxy model.
- [37:59](https://www.youtube.com/watch?v=n3z7u79VSkM&t=2279s) The speaker advises against over-engineering for infinite scale on day one, recommending instead to build for the required scale and plan for capacity at 60 utilization.

## Takeaways

- Design architectures for the scale you currently need rather than over-engineering for infinite scale from day one.
- Use warm container pools to drastically reduce cold start times in serverless environments.
- Combine multi-tenant and single-tenant data storage strategies to efficiently handle long-tail usage patterns in databases.
- Incremental optimizations will only get you so far; orders-of-magnitude scale increases require fundamentally new architectural approaches.

## Questions this talk answers

- How do you achieve sub-100ms cold start times in a multi-tenant serverless environment?
- What is the best strategy for handling database scalability when managing millions of distinct application schemas?
- When is the right time to transition a custom container orchestration setup to Kubernetes?

## Technologies

Node.js, MongoDB, Kubernetes, Docker, JavaScript, HTML, CSS

## Tags

architecture, containers, database design, kubernetes, performance optimization, scaling, serverless
