Hi
Super excited about litestream being part of fly.io
I am building a firebase alternative using sqlite (https://javascriptdb.com) and I want to use fly.io for the infrastructure.
-
Are you guys planning to offer a sqlite service similar to your postgres service? Do you have a rough ETA?
-
Is there a way to set the
fly-replay
header from the client? Because I control the client sdk and the server, I can tell if an HTTP call should go straight into the write instance.
I see two benefits in doing this:
First, you save wasted time doing any business logic and trying to write.
Second, this could be a work around stale data on read replicas after a write, here’s what I’m thinking:
- Client sdk does a POST/PUT request (knows that is a write, adds ‘fly-replay’ header).
- Client sdk then adds a timer to set the ‘fly-replay’ header to all requests for the next X milliseconds.
- Within X milliseconds client sdk does a GET request to get the data that was just updated. Because the header is present, request goes to the write replica, data is consistent.
- After X milliseconds client sdk does a GET request for the same data. Header is NOT present, request goes to the nearest read replica, data is consistent because replication already happened.
Forgive me if what I’m saying doesn’t make any sense.