WoodWing / elvis-image-recognition

Elvis integration with AI based image recognition services from AWS, Google and Clarifai
MIT License
11 stars 10 forks source link

HA setup? #2

Closed siebrand closed 6 years ago

siebrand commented 6 years ago

How would one make an HA setup for this in AWS? By making an auto scaling group of Node JS boxes, and adding a load balancer in front of it, or are the reasons this would fail?

siebrand commented 6 years ago

Could this alternatively be set up wit Serverless on AWS using API gateway and Lambda? That would make it scale best, and make for a really easy setup of the node.js part.

jaapvanblaaderen commented 6 years ago

Making an autoscaling group would indeed work, as long as you use an Elvis API user (which supports concurrent logins).

Using an AWS Lambda would indeed even be better, it's something I want to test, didn't find the time to do so however.

siebrand commented 6 years ago

as long as you use an Elvis API user

Per documentation (header 3) it's required to use an API user, so that's not an issue.

I have everything in CloudFormation now with a load balancer and an auto-scaling group. Getting everything installed and configured automatically using puppet is almost done, and getting the service to start using systemd will be the last challenge.

Being able to run this in AWS Lambda with API gateway, S3 for storage if needed and something like DynamoDB for state management would be pretty cool.

siebrand commented 6 years ago

I've now set this up, but I'm having trouble getting the load balancer to declare a node healthy. What could I use for a health check? As far as I can tell, nothing like a "ping" has been implemented. Is there a URL you can recommend to use for a health check, or could you maybe add a ping URL to this application?

jaapvanblaaderen commented 6 years ago

Code is merged to master.