✨(load-tests) add JMeter load-testing scenarios - #791
Open
NathanVss wants to merge 4 commits into
Open
Conversation
Load-test scenarios authenticate through the e2e user-auth endpoint, which must be available on a production-like instance without enabling DEBUG. LOAD_E2E_URLS is kept as a plain literal so no environment variable can ever flip it, and post_setup refuses to start any configuration outside an explicit allowlist that would expose it. Deploying with DJANGO_CONFIGURATION=LoadTest becomes the only way to expose these endpoints on a Production-derived setup, making it a deliberate and reviewable infrastructure decision.
We need to measure backend response times and error codes from 100 up to 100k simultaneous users, on any instance. The scenario simulates a full user session (browse, recents, shared-with-me, folder creation, upload, trash, hard-delete) with randomized think times, using the e2e auth endpoint instead of the IDP, out of scope like the WOPI editors. Everything is property-driven (BASE_URL, USERS, USER_OFFSET...) so the same plan runs unchanged against any instance and across distributed injectors, each with its own USER_OFFSET to keep generated user emails globally unique. Uploads reproduce the frontend flow (item creation, presigned PUT to the object storage, upload-ended) and randomly pick a fixture entry; folder entries mirror the frontend folder upload by materializing the hierarchy before uploading each file into its parent.
The mixed scenario writes on every session, while real drive traffic is massively read-dominant. This variant keeps the same building blocks but only UPLOAD_PCT percent of sessions (15 by default) go through the write path; every session browses root items, recents, shared-with-me and navigates into a randomly picked folder and subfolder. To make reads meaningful despite empty fresh accounts, the first session of each user always uploads the fixture folder tree and keeps it for the whole run. Seed folders are left behind on purpose: the target instance is reset by ops (database and bucket) between test campaigns.
Required by the check-changelog CI job.
NathanVss
force-pushed
the
feat/load-testing
branch
from
July 29, 2026 15:23
08245c4 to
b346f8c
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Purpose
Measure backend response times and error codes under loado n any instance. WOPI editors and the IDP are out of scope:
authentication goes through the e2e
user-authendpoint, like the e2e tests.Proposal
Backend — a safe way to expose the e2e auth endpoints on a production-like
target:
LOAD_E2E_URLSstays a plain literal (never readable from the environment)and
post_setuprefuses to boot any configuration outside an explicitallowlist that would enable it.
LoadTest(Production)configuration: identical toProductionbut withthe endpoints enabled. Deploying
DJANGO_CONFIGURATION=LoadTestis the onlyway to expose them on a production-derived setup.
load-tests/— two JMeter scenarios, fully property-driven (BASE_URL,USERS,RAMP_UP,DURATION,USER_OFFSET,USER_EMAIL, think times...):drive-session.jmx: a full user session — login, app bootstrap, browse,recents, shared-with-me, folder creation, upload, trash, hard-delete —
with randomized think times between actions. Uploads reproduce the frontend
flow (item creation, presigned PUT to object storage,
upload-ended) andrandomly pick an entry from
load-tests/files/; folder entries mirror thefrontend folder upload (hierarchy first, then each file into its parent).
drive-session-read-heavy.jmx: realistic read-dominant traffic. Everysession browses; only
UPLOAD_PCT% (default 15) also write. Each user seedsits account on its first session so reads hit real data, and a tearDown
thread group hard-deletes everything at the end of the run, including
folders orphaned by interrupted iterations.
Distributed runs use independent injectors with per-machine
USER_OFFSET(see
load-tests/README.mdfor the full parameter list, the rationale andthe results-merging procedure). Every request asserts its expected status
code so any deviation surfaces in the HTML dashboard with the actual code.