0% found this document useful (0 votes)
129 views4 pages

CMPT 756 Project Final Presentation - Group 22

The project compares the performance and cost-effectiveness of containerized (AWS ECS) and serverless (AWS Lambda) deployment models for a computer vision application. An initial model was too complex, so a simpler MNIST digit classification model was used instead. The core app is a FastAPI app running this PyTorch model in Docker containers on ECS and Lambda. Testing showed Lambda had lower latency but ECS was more cost-effective for the workload.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views4 pages

CMPT 756 Project Final Presentation - Group 22

The project compares the performance and cost-effectiveness of containerized (AWS ECS) and serverless (AWS Lambda) deployment models for a computer vision application. An initial model was too complex, so a simpler MNIST digit classification model was used instead. The core app is a FastAPI app running this PyTorch model in Docker containers on ECS and Lambda. Testing showed Lambda had lower latency but ECS was more cost-effective for the workload.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Containerized vs Serverless

- Choosing the right deployment model for your next CV


app

The project aims to compare the performance and cost-effectiveness of two deployment models,
containerized (AWS ECS) and serverless (AWS Lambda), for a computer vision application using a
simple PyTorch model. Initially intending to use the UNet architecture for image segmentation,
technical limitations led to the adoption of a simpler MNIST handwritten digit classification model.

Group-22
Naveen
Akanksha
Baorong
Sohail
Fayad
System's Functionality & Design
- Deployment Models: AWS ECS &
AWS Lambda

- Communication: HTTP & REST API

- Storage: In-memory processing

- Monitoring: AWS CloudWatch,


custom logging

- Scaling: Dynamic scaling based on


demand

- Goal: To determine the best


deployment approach based on
latency, cost, and resource efficiency
for CV applications by simulation with
an image classification task

The core app is a FastAPI app running a simple PyTorch


model
Implementation Details Challenges Along The Way
- DL Model: 2 layer CNN (1 vCPU and <2GB RAM) - Architecture issues: Docker images built on M1 MacBook Air
can run on arm64 architecture VMs only, unless platform is
- FastAPI app: Configures PyTorch model, loads weights and specified (image becomes very large)
serves predictions; wrapped in Mangum wrapper for Lambda
and EC2 (run in Uvicorn ASGI server). - AWS Lambda Function resource limitations: Resources
allocated to AWS Lambda functions are not enough to host
- Dockerization: Two images prepared for Lambda large image segmentation models; had to shift to smaller,
(lambda/python image) and ECS (base python image) using simpler models for simpler tasks
Docker on M1 (arm64 architecture) MacBook Air.
- Stress testing and timeouts: Multiple timeouts in concurrent
- AWS Lambda Function: 2GB memory, arm64 architecture, requests due to TCP timeouts; data also showed up after 5
5-minute timeout. minute intervals on AWS CloudWatch making it difficult to
pinpoint exact responses by the system
- AWS ECS Cluster: Auto-Scaling Group of 0-5 EC2
t4g.medium instances; tasks with 1 vCPU, 2-3GB memory.

- AWS CloudWatch Monitoring: Tracks CPU, memory, and


function invocation metrics.

- Stress Testing: JMeter for concurrent request analysis by


hitting API endpoints.
Interesting Results & Analysis

ECS Latency trends: - Processing times (time taken by server to receive


- General increase request, infer and send out response) similar
- Sudden bumps due to random TCP timeouts - Throttling increases function execution duration (but
processing time) remains the same)
Lambda Latency trends:
- Generally constant

Overall recommendation…?
- Lower than ECS
- Spikes due to “cold start”

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy