benbjohnson / litestream-read-replica-example

An example of using Litestream's live read replication feature.
Apache License 2.0
52 stars 4 forks source link

question: Write go to Master origin ? #1

Closed gedw99 closed 9 months ago

gedw99 commented 9 months ago

hey @benbjohnson

I need to set this up with Pocketable, and wanted to know the sure fire way to do this on a globally replicated fly setup.

Does this fly config make it so that writes go to Master ( origin DC as some would call it ), and reads go to Secondaries ?

Because of the Anycast fly system, a user will go to nearest DC, so on a http write, its hitting the Secondary DC ( closest to Usr ) and then under the hood the DB write is hitting Master DC Sqlite DB ?

gedw99 commented 9 months ago

Also if there is a better example, please let me know, as this looks a bit old :)

benbjohnson commented 9 months ago

@gedw99 The read replication was removed from Litestream because it was untenable. Replication was implemented in LiteFS instead.

gedw99 commented 9 months ago

Thanks . This repo is basically legacy ..

Will test on litefs ..

benbjohnson commented 9 months ago

I'll mark this repo as archived.