Is this architecture common? Well, I suspect it is overkill for most smaller organizations due to increased infrastructure complexity. I wouldn't do this just for the sake of doing it -- you may find yourself saddled with an increased maintenance workload just keeping the infrastructure running.
But if you truly have this use case, this is a well-known method for syncing data across various types of datastores (ie. so-called polyglot persistence).
[0] https://www.confluent.io/blog/bottled-water-real-time-integr...
If we need to replay something we just move the group of files in and out of the folder on s3 (bucket/logs -> bucket/temp -> bucket/logs) and it triggers a new objectCreated and fires the lambda.
We execute the 2 move operations with the AWS cli tool.
The one other thing we do is we have a config file in bucket/config.json that’s says event type X should go to redshift, pg, es, where ever. So we can tweak that before a move to send data to additional data stores.
We follow ELT instead of ETL for streaming into data stores.
I'd imagine that 99% or more of that 400GB/day gets thrown away before ending up in Redshift.
We usually only replay when we want to restore data for querying stuff outside the pruning range.
We keep all that data forever.
That’s just one system. Our Nginx access logs alone are about 250GB per day (they use that system).
We use replay capability to fix bugs, add new features to existing data, and to load qa environments.
[0] https://github.com/Factual/s3-journal
[1] http://www.onyxplatform.org/
[2] https://github.com/onyx-platform/onyx-amazon-s3
[3] http://www.onyxplatform.org/docs/api/0.10.x/onyx.storage.s3....
If you run Kafka yourself, you can set an infinite retention and keep all the messages, and also use the compaction feature to keep the latest value for every key to reduce some of the bloat if that applies to your data, but if you don't need it instantly accessible then it's probably worth archiving to cheaper storage.
- If your Kafka retention period is long enough, then the data will still be sitting in Kafka. You don't need to replay, just have the new consumer start from the beginning.
- If the retention period is not long enough, then you'll have to replay data. There's not any provision for that in Kafka itself - it's really just a somewhat-smart logfile. But whatever you're using to write into Kafka may have some way to do it. This is similar to most message queuing or eventing systems. eg, RabbitMQ.
https://cloud.google.com/dataflow/docs/templates/provided-te...