Lambda on hard mode: Inside Modal's web infrastructure | Modal Blog
At Modal, we built an HTTP and WebSocket stack on our platform. In other words, your serverless functions can take web requests. This was tricky! HTTP has quite a few edge cases, so we used Rust for its speed and to help manage the complexity. But even so, it took a while to get right. We recently wrapped up this feature by introducing full WebSocket support (real-time bidirectional messaging). We call this service modal-http, and it sits between the Web and our core runtime. You can deploy a simple web endpoint to a *.modal.run URL by running some Python code: (This takes 0.747 seconds to deploy today.) But you can also run a much larger compute workload. For example, to set up a data-intensive video processing endpoint: This post is about the behind-the-scenes of serving a web endpoint on Modal. How does your web request get translated into an autoscaling serverless invocation? What makes our HTTP/WebSocket implementation particularly interesting is its lack of limits. Serverless com
All posts Back Engineering March 14, 2024 • 20 minute read Lambda on hard mode: Inside Modal's web infrastructure Eric Zhang Founding Engineer At Modal, we built an HTTP and WebSocket stack on our platform. In other words, your serverless functions can take web requests. This was tricky! HTTP has quite a few edge cases, so we used Rust for its speed and to help manage the complexity. But even so, it took a while to get right. We recently wrapped up this feature by introducing full WebSocket support (real-time bidirectional messaging). We call this service modal-http , and it sits between the W
related reading
- Modal's serverless Servers | Modal Blogmodal.com
- Modal: High-performance AI infrastructuremodal.com
- Introductionmodal.com
- Serverless Framework - AWS Lambda Events - Websocket | Serverless Frameworkserverless.com
- Serverless Framework - AWS Lambda Events - Websocket | Serverless Frameworkserverless.com
- Low Latency and Model Training at Modalrhea24.github.io
- Realtime with serverless using Websocket in AWSunimedia.tech
- How Mozilla’s Rust dramatically improved our server-side performance | Figma Blogfigma.com
- On-demand Container Loading in AWS Lambdaarxiv.org
- Using API Gateway WebSockets with the Serverless Framework | Serverless Frameworkserverless.com
- How we achieved truly serverless GPUsmodal.com
- Serverless Framework v1.46.0 - Extended ALB configurability, Support for external Websocket APIs, Local plugins via relative paths & More | Serverless Frameworkserverless.com