LD4P / sinopia_server

[Deprecated - switching to MongoDB] Sinopia Back-end CRUD Service. LDP-inspired, HTTP Server taking JSON-LD resources & administrative metadata.
Apache License 2.0
1 stars 1 forks source link

Determine number of Trellis instances in AWS #109

Open rsmith11 opened 5 years ago

rsmith11 commented 5 years ago

Currently Trellis is running as a single container in each AWS environment. Does Trellis support load balancing between nodes? Do we know if it can handle handing off traffic to multiple instances, i.e. passing token id and not asking users to reauthenticate? If it can handle those, do we want/need more than one instance running?

acoburn commented 5 years ago

FYI: in principle, the Trellis HTTP nodes are share-nothing, so you can put multiple nodes behind a load balancer. Given that Sinopia uses RDS, each node would need access that same, shared database. If you are using AWS's ActiveMQ service, each node would need to be configured to point to that same broker. In short, you'd just need the same configuration applied to each node.

For NonRDFSource (binary) as well as Memento resources, I believe that Sinopia stores those as files; this common file store would need to be shared across instances (e.g. with EFS). In terms of token handling, the JWT tokens are also stateless and can be handled by any node.

rsmith11 commented 5 years ago

Thanks @acoburn. We are using EFS mounted at /opt/trellis/data to retain the memento resources.