feat(amber): set cache-control headers for static frontend assets#5846
feat(amber): set cache-control headers for static frontend assets#5846Ma77Ball wants to merge 13 commits into
Conversation
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 410 | 0.25 | 23,737/30,798/30,798 us | 🔴 -7.1% / 🔴 +97.7% |
| 🟢 | bs=100 sw=10 sl=64 | 838 | 0.511 | 119,037/130,878/130,878 us | 🟢 -19.2% / 🔴 +19.4% |
| ⚪ | bs=1000 sw=10 sl=64 | 929 | 0.567 | 1,077,839/1,104,452/1,104,452 us | ⚪ within ±5% / 🔴 -6.8% |
Baseline details
Latest main 6db0d6b from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 410 tuples/sec | 441 tuples/sec | 758.88 tuples/sec | -7.0% | -46.0% |
| bs=10 sw=10 sl=64 | MB/s | 0.25 MB/s | 0.269 MB/s | 0.463 MB/s | -7.1% | -46.0% |
| bs=10 sw=10 sl=64 | p50 | 23,737 us | 22,385 us | 12,965 us | +6.0% | +83.1% |
| bs=10 sw=10 sl=64 | p95 | 30,798 us | 32,557 us | 15,578 us | -5.4% | +97.7% |
| bs=10 sw=10 sl=64 | p99 | 30,798 us | 32,557 us | 18,378 us | -5.4% | +67.6% |
| bs=100 sw=10 sl=64 | throughput | 838 tuples/sec | 789 tuples/sec | 968.9 tuples/sec | +6.2% | -13.5% |
| bs=100 sw=10 sl=64 | MB/s | 0.511 MB/s | 0.482 MB/s | 0.591 MB/s | +6.0% | -13.6% |
| bs=100 sw=10 sl=64 | p50 | 119,037 us | 120,352 us | 102,767 us | -1.1% | +15.8% |
| bs=100 sw=10 sl=64 | p95 | 130,878 us | 162,019 us | 109,629 us | -19.2% | +19.4% |
| bs=100 sw=10 sl=64 | p99 | 130,878 us | 162,019 us | 118,129 us | -19.2% | +10.8% |
| bs=1000 sw=10 sl=64 | throughput | 929 tuples/sec | 936 tuples/sec | 997.01 tuples/sec | -0.7% | -6.8% |
| bs=1000 sw=10 sl=64 | MB/s | 0.567 MB/s | 0.571 MB/s | 0.609 MB/s | -0.7% | -6.8% |
| bs=1000 sw=10 sl=64 | p50 | 1,077,839 us | 1,066,572 us | 1,009,306 us | +1.1% | +6.8% |
| bs=1000 sw=10 sl=64 | p95 | 1,104,452 us | 1,103,494 us | 1,051,088 us | +0.1% | +5.1% |
| bs=1000 sw=10 sl=64 | p99 | 1,104,452 us | 1,103,494 us | 1,082,535 us | +0.1% | +2.0% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,487.59,200,128000,410,0.250,23736.75,30798.38,30798.38
1,100,10,64,20,2387.50,2000,1280000,838,0.511,119037.10,130877.69,130877.69
2,1000,10,64,20,21536.23,20000,12800000,929,0.567,1077838.59,1104452.44,1104452.44
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5846 +/- ##
============================================
- Coverage 55.19% 55.17% -0.02%
+ Complexity 2978 2976 -2
============================================
Files 1117 1118 +1
Lines 43195 43218 +23
Branches 4657 4661 +4
============================================
+ Hits 23840 23847 +7
- Misses 17955 17964 +9
- Partials 1400 1407 +7
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Automated Reviewer SuggestionsBased on the
|
|
/request-review @Yicong-Huang |
|
/request-review @aglinxinyuan |
What changes were proposed in this PR?
no-cache, must-revalidateso a stale entry document is never served past a deploy; content-hashed bundles (name..js/.css and other fingerprinted assets) getpublic, max-age=31536000, immutable; /api/* responses are left untouched.Any related issues, documentation, discussions?
Closes: #5835
How was this PR tested?
sbt "WorkflowExecutionService/testOnly *StaticAssetCacheFilterSpec"on JDK 17, expect 7 passing cases: hashed js/css/media to immutable, index.html and Angular routes to revalidate, /api/* untouched, and short numeric segments not mistaken for a content hash.curl -I http://localhost:8080/index.htmland expectCache-Control: no-cache, must-revalidate;curl -Ia hashed bundle (e.g. /main..js) and expectCache-Control: public, max-age=31536000, immutable.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF