S3 batch export: Parallelize upload for increased performance
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 34/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- aws, clickhouse, python
- Domain
- backend, cloud, data-engineering
Research direction
Locate the S3 batch export entry point, the S3 multipart upload manager, and the ClickHouse consumers. Read how upload ordering and progress are currently handled, then verify that consumers can share one manager, uploads can run in parallel, and pending work is cancelled after a failure.
Written by the indexing model from the issue text.
Description
Feature request
Is your feature request related to a problem?
Not strictly a problem, but S3 batch exports are leaving performance gains on the table now that they do not track progress. Given that we always restart from the beginning, we can drop ordering constraints and parallelize the consumption of data from ClickHouse.
Describe the solution you'd like
The S3 multi part upload management would have to be separated from the S3 consumers. Now, multiple S3 consumers should share a reference to the same S3 multi part upload manager, which would be in charge of deciding when to start a new upload. This will require the use of some async synchronization primitives.
In the event of a failure, all pending uploads can be cancelled.
Describe alternatives you've considered
N/A
Additional context
Faster performance also helps with avoiding timeouts in the event of instability.
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PostHog/posthog
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
MotherDuck incremental sync never checks for duplicate primary keys, so the guard is a dead branch Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100