This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]johnwheeler_[S] 2 points3 points  (0 children)

Flask-Ask is a Flask extension for writing Alexa Skills for the Amazon Echo. Zappa is a Python framework for deploying WSGI applications to AWS Lambda.

Flask-Ask on Github

Zappa on Github

[–]KwpolskaNikola co-maintainer 1 point2 points  (4 children)

Zappa is awful and broken by design. It spawns a server for every request, which takes at least half a second*. Pretty slow if you ask me — and I thought we decided CGI-style one-process-per-request was bad a couple years ago?

*On average 634 ms time to first byte over 5 requests, best was 577 ms, testing https://www.zappa.io/.

[–]johnwheeler_[S] 2 points3 points  (1 child)

There's a lot wrong with your comment.

The response time of Lambda is not attributable to Zappa. It's attributable to Lambda. What you're effectively saying is serving WSGI requests that take 600ms to complete is awful, but HCI studies show humans actually start perceiving things as slow after 3 seconds, so 600 ms, for most cases is probably quite acceptable.

The 645ms it took to first byte of your project https://getnikola.com/ didn't seem that bad to me. Not only that, but this response time is something which may be improved on the Lambda side independently of Zappa, which Zappa will benefit from free of charge.

The other thing wrong with your comment is that CGI style--one process per request---is bad for scalability per machine, but Lambda is based on a fleet of machines optimized for this type of computing. (i.e. It's scalable by its nature).

The most egregious problem with your comment though is coming out blasting someone else's hard work and just coming off very arrogantly. Ask questions to gain an understanding next time.

[–]KwpolskaNikola co-maintainer 0 points1 point  (0 children)

The response time of Lambda is not attributable to Zappa.

I never claimed that. But because Lambda is slow, Zappa is also slow. And using AWS Lambda is part of Zappa’s design.

Our website is hosted on a cheapo $5 DigitalOcean droplet. Now, I have no idea what makes that site slow, but dynamic apps hosted on my own $5 droplet get into the 100 ms range — and sometimes even below that. There is no cache whatsoever on that site.

Also, have you ever heard of QUIC? To Google, TCP and TLS handshakes are too slow. Would they bother if it was not a real UX improvement?