6

Most of the documentation seems to be about running a single server.

However, I'm wondering if it makes more sense to have a shared DB (e.g. RDS) and multiple application servers that use that. I'd want to run multiple nodes mainly for failover reasons.

Is this possible at all? If so, what are the requirements for the applications without the DB? I noticed that horizon on my laptop is mostly idling and doesn't need much memory. Is this something that is going to use a lot of cpu/memory or can we get away with a couple of m2.medium's for this?

1 Answer 1

5

A shared db definitely makes a lot of sense for most production deployments, if you have access to RDS then it has some very convenient features, it takes care of backups, offers point in time recovery and if using HA you get a standby master too...

As well as using shared databases, you will want to run your Horizon and Core deployments on multiple servers to mitigate against instance failure, you need to make sure to only ingest on 1 horizon node.

Further to this and to avoid stellar-core becoming a single point of failure, it is recommended you run a standby core node with its own database ready to be flipped to in case of outage. This could be automated with a heartbeat solution like Keepalived or Linux HA's pacemaker.

There is a generic overview of a production environment on the package installation page

With regards to instance specs, it really is dependent on how busy your cluster is expected to get. Horizon and the databases do like a fast CPU, stellar-core is by far the least resource hungry component but does use IO a fair bit during catch-up, something to watch out for...

2
  • OK thanks. So core cannot be distributed and must have 1 instance per DB? Is it possible for horizon to depend on several core instances (each with their own db)? What does it mean for horizon to ingest? Is it copying transactions from core to its own db? How long does this catch up take? Commented Sep 2, 2018 at 12:25
  • Ingestion is the process by which Horizon processes and imports network data into its own horizon db, this process only needs to happen on 1 instance. If you need each horizon instance in your cluster to have the same view of the network then at present it is best to have 1 core instance shared between the horizon instances. The catch-up time depends on a number of factors but for reference a full catch-up recently took over 5 days on a c5.large. Commented Sep 2, 2018 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.