Re:Going Serverless: Migrating an Express App to AWS API Gat...
by Mizza on Tuesday October 11, 2016 @01:41AM
(#12682100)
If you design your correctly (at least in Python), you can cache and reuse your open database connection.
[ Parent
| on HN ]
Re:Going Serverless: Migrating an Express App to AWS API Gat...
by ranman on Tuesday October 11, 2016 @01:43AM
(#12682108)
How exactly have you been doing that? It would be a cool blog post if you had the time. I've been thinking about really high volume applications that connect to haproxy instances that do DB load balancing but even that has it's own set of initial latency issues. I haven't fully figured out that architecture. In python in particular I'd really love to know how to setup the connection reuse.
Re:Going Serverless: Migrating an Express App to AWS API Gat...
by Mizza on Tuesday October 11, 2016 @01:48AM
(#12682127)
Check out the handler source code in Zappa for an example of a pattern like that. Similarly, if you use Zappa to deploy your application, if you create your database connection when the application loads, it'll just work.
Stop by the Zappa slack if you want to explore this in more detail! https://slack.zappa.io It could always use more investigation, but there are quite a few Zappa users at extremely high loads now without any issues.
Re:Going Serverless: Migrating an Express App to AWS API Gat...
by joeyspn on Tuesday October 11, 2016 @06:39AM
(#12683046)
You've got a problem with the naked domain redirects http://zappa.io https://zappa.io/
Re:Going Serverless: Migrating an Express App to AWS API Gat...
by avyfain on Tuesday October 11, 2016 @02:50AM
(#12682282)
This project looks super interesting. Thanks for sharing it!
Now I want to come up with a use case to test it out over the next few days, maybe something for the Echo? I joined your Slack, we'll see where this takes us :)
Re:Going Serverless: Migrating an Express App to AWS API Gat...
by Mizza on Tuesday October 11, 2016 @11:47AM
(#12685469)
That's a great use case, many people are using flask-ask and Zappa together to great success: https://github.com/johnwheeler/flask-ask