Deployment Configuration Advice for TiTiler on ECS Fargate: Gunicorn vs. Uvicorn Workers #1044
              
                Unanswered
              
          
                  
                    
                      AbhishekD15
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m currently working on deploying TiTiler as a Docker container to AWS ECS Fargate. The service processes a 600 GB COGTiff file, dynamically generating tiles. Since this is a CPU-intensive process, I want to ensure the deployment configuration is both efficient and scalable.
Specifically, I’m seeking advice on the best approach for managing workers:
Option 1: Using Uvicorn with a single worker and relying solely on Auto Scaling for handling increased load.
Option 2: Using Gunicorn with multiple Uvicorn workers to leverage multiprocessing and also using Fargate auto scaling strategy.
While researching, I couldn’t find a clear comparison or best practices for TiTiler in such scenarios. I’m curious if:
Uvicorn-only setups can scale efficiently on Fargate for CPU-heavy workloads.
There are advantages of Gunicorn with Uvicorn workers for this use case, especially when dealing with large geospatial files like COGTiffs.
Has anyone faced a similar situation or found reliable resources discussing this? Any guidance, best practices, or links to relevant documentation would be greatly appreciated.
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions