Skip to content

feat: paginate post sitemap index#3759

Merged
idoshamun merged 3 commits intomainfrom
eng-1181-seo-p1-remove-50k-hard-cap-on-posts-sitemap-use-paginated
Mar 31, 2026
Merged

feat: paginate post sitemap index#3759
idoshamun merged 3 commits intomainfrom
eng-1181-seo-p1-remove-50k-hard-cap-on-posts-sitemap-use-paginated

Conversation

@idoshamun
Copy link
Copy Markdown
Member

Summary

  • paginate the posts sitemap into posts-1.xml, posts-2.xml, and subsequent 50k chunks
  • generate the sitemap index from the qualifying post count so every post sitemap page is referenced
  • keep cache-control behavior unchanged and add sitemap coverage for pagination and stable ordering

Key decisions

  • kept /sitemaps/posts.xml as a first-page alias for compatibility while the sitemap index points at paginated files
  • added a deterministic secondary sort on post id so pagination does not skip or duplicate posts when timestamps match

Closes ENG-1181


Created by Huginn 🐦‍⬛

@pulumi
Copy link
Copy Markdown

pulumi Bot commented Mar 31, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at ebe9344) was successful.

✨ Neo Explanation

This is a routine application deployment rolling out a new build to all 7 services, 38 cron jobs, and triggering fresh database and ClickHouse migration jobs in the production GKE cluster. No infrastructure changes are involved — only the application image version is changing.

Root Cause Analysis

A new version of the application has been built and is being deployed across the entire production environment. Every workload is being updated from the previous build to the latest one.

Dependency Chain

The new application image version cascades uniformly to all Kubernetes resources that reference it:

  • 7 Deployments (API, background workers, WebSocket server, private, temporal, personalized digest, worker jobs) will perform a rolling update to the new container image
  • 38 CronJobs will have their job templates updated so all future scheduled runs use the new image
  • 2 one-time migration Jobs (database and ClickHouse) tied to the previous build are deleted, and 2 new migration Jobs for the current build are created — these run the TypeORM and ClickHouse migration scripts before or alongside the deployment

Risk analysis

No stateful resources (databases, storage buckets, persistent volumes) are being replaced or deleted. The migration jobs involve schema changes against live databases, which carry inherent risk if the migrations are not backward-compatible, but this is standard deployment practice for this stack. Deployments use rolling updates, so no downtime is expected.

Resource Changes

    Name                                                       Type                           Operation
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-worker-job-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-0d07d143                       kubernetes:batch/v1:Job        delete
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob    update
+   vpc-native-api-clickhouse-migration-226c4686               kubernetes:batch/v1:Job        create
~   vpc-native-personalized-digest-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-images-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
+   vpc-native-api-db-migration-226c4686                       kubernetes:batch/v1:Job        create
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-hourly-notification-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-tag-view-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-0d07d143               kubernetes:batch/v1:Job        delete
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-recommendations-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
... and 10 other changes

Copy link
Copy Markdown
Member

@nimrodkra nimrodkra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@idoshamun idoshamun merged commit 85d40c6 into main Mar 31, 2026
9 of 11 checks passed
@idoshamun idoshamun deleted the eng-1181-seo-p1-remove-50k-hard-cap-on-posts-sitemap-use-paginated branch March 31, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants