How to uninstall SBT?
1,077
There's nothing to uninstall. Just delete the directory you got from unpacking the archive and remove the export PATH
line from your .bashrc
.
Related videos on Youtube
Author by
Luke
Updated on September 18, 2022Comments
-
Luke almost 2 years
When deploying a bare-bones Django application using Zappa, I'm finding my TTFB (Time To First Byte) times are between 280-800ms however generally around 700ms. Which is far too long for a website.
Other people seem to be getting much better response times such as "125ms to 500ms ... (probably averaged about 175ms)" (https://www.reddit.com/r/django/comments/44r55j/announcing_djangozappa_serverless_django_on_aws/).
To reproduce my issue:
pip3 install django-admin mkdir test cd test virtualenv .env source .env/bin/activate pip3 install django zappa django-admin startproject zaptest zappa init (and choose all defaults) zappa deploy dev
And go to the URL supplied.
Any advice on how to speed this up would be much appreciated.
-
Kevin Christopher Henry almost 6 yearsRead about Lambda cold starts versus warm starts. The sequence of steps you describe above will result in a cold start, with a long and mostly unavoidable time to first byte. Subsequent hits to the same instance will be significantly faster. Any attempt to measure and control Lambda performance must take this distinction into account.
-
Luke almost 6 years@KevinChristopherHenry sorry I should have explicitly mentioned that the average response time of 700ms was from repetitively loading the page. Not waiting for the service to cool down. Zappa by default has a 4-minute cron to keep the service warm as well.
-
Brian Destura almost 6 yearsDid you try setting the keep-warm to 1 minute?
-
Luke almost 6 years@bdbd I'm uncertain if I tried changing keep-warm to 1 minute. However, I was reloading a page multiple times within a minute. I don't think the project was cold starting, since that was considerably slower.
-
Brian Destura almost 6 yearsSetting it to 1 minute should help. Have a read at: medium.com/thundra/…
-
Brian Destura almost 6 yearsAlso is your lambda inside a VPC?
-
Luke almost 6 years@bdbd thanks for all your suggestions. I wasn't running lambda in a VPC. I tried re-deploying before testing your 1 minute keep-warm suggestion. However, I couldn't get it to go above 200ms before making your change. I'm guessing I just kept getting deployed on overloaded servers.
-
ambientlight over 5 yearsThe default zappa configuration deploys with 512mb ram setting. As AWS puts it: Your function is allocated CPU proportional to the memory configured. Setting to to higher values 1856mb should improve on cold start time (linear).
-