Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict maximum size of client HTTP request #3941

Merged
merged 40 commits into from
Jun 23, 2022

Conversation

jumaffre
Copy link
Contributor

Resolves #3912

This PR adds configuration parameters (set by the operator on node startup) to cap the maximum size of client HTTP request a) body, 2) header size and 3) headers count. When this occurs we send back a 413 (a) or 431 and automatically close the client session.

@jumaffre jumaffre added 2.x-todo PRs which should be backported to 2.x auto-backport Automatically backport this PR to LTS branch labels Jun 15, 2022
@jumaffre jumaffre requested a review from a team as a code owner June 15, 2022 15:15
Julien Maffre added 2 commits June 15, 2022 16:15
@ccf-bot
Copy link
Collaborator

ccf-bot commented Jun 15, 2022

max_msg_size_http@46951 aka 20220623.13 vs main ewma over 20 builds from 46589 to 46944

Click to see table

main

build_id build_number tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_v8_sgx_cft^ ls_v8_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_full_v8_sgx_cft^ ls_full_v8_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
46589 20220616.1 6471.44 8.37592e+07 20351.8 1.66503e+07 5732.22 1.53396e+07 2554.17 1.14074e+07 1650.33 1.63451e+08 2124.5 9.31027e+06 1444.36 9.81771e+07 2016.27 9.04813e+06 19668.5 867241 1.31602e+06 9.00608e+06 3.5128e+07
46651 20220617.3 6432.37 8.32349e+07 19902.5 1.66503e+07 5564.93 1.53396e+07 2602.69 1.00967e+07 1637.48 1.61354e+08 2114.21 9.31027e+06 1428.81 9.76528e+07 1920.21 9.04813e+06 19444.2 910820 1.37099e+06 9.14278e+06 3.58663e+07
46655 20220617.5 6582.32 8.37592e+07 20271.4 1.6126e+07 5648.15 1.53396e+07 2541.9 1.00967e+07 1649.28 1.63451e+08 2116.58 1.32424e+07 1443.87 9.81771e+07 1963.89 8.78598e+06 20023.8 930184 1.37255e+06 9.48583e+06 3.66369e+07
46679 20220620.1 6186.76 8.42835e+07 20080.4 1.63882e+07 5783.09 1.50774e+07 2544.23 1.00967e+07 1645.83 1.63451e+08 2127.26 9.31027e+06 1437.49 9.81771e+07 1931.89 9.04813e+06 20588.6 902596 1.37921e+06 9.26274e+06 3.59298e+07
46708 20220620.12 6410.18 8.3497e+07 20046.9 1.63882e+07 5522.76 1.53396e+07 2545.31 1.00967e+07 1612.62 1.63189e+08 2108.99 9.04813e+06 1432.94 9.81771e+07 1929.21 9.04813e+06 19234.3 883667 1.38172e+06 9.18382e+06 3.54939e+07
46732 20220620.23 6276.97 8.32349e+07 20367.7 1.58639e+07 5667.8 1.50774e+07 2531.36 1.00967e+07 1646.82 1.62927e+08 2114.54 9.31027e+06 1399.96 9.81771e+07 1975.71 8.78598e+06 17876.3 907078 1.37045e+06 9.12656e+06 3.58042e+07
46741 20220620.26 6515.01 8.3497e+07 19127.8 1.58639e+07 5749.39 1.50774e+07 2596.32 1.00967e+07 1626.13 1.63189e+08 2115.71 9.31027e+06 1437.82 9.81771e+07 1971.93 8.78598e+06 19986.1 873493 1.38033e+06 9.20859e+06 3.57417e+07
46755 20220620.33 5854.04 8.37592e+07 19968 1.58639e+07 5638.65 1.56017e+07 2528.41 1.00967e+07 1615.92 1.63451e+08 2078.47 9.57242e+06 1441.23 9.79149e+07 1932.26 8.78598e+06 19767.7 909413 1.35737e+06 9.326e+06 3.58669e+07
46766 20220621.5 6401.03 8.3497e+07 19861.6 1.58639e+07 5667.98 1.53396e+07 2611.12 1.00967e+07 1615.19 1.62927e+08 2132.03 9.57242e+06 1443.54 9.84392e+07 2010.31 8.78598e+06 19602.3 924348 1.35422e+06 9.26274e+06 3.61199e+07
46769 20220621.6 6611.97 8.40213e+07 19570.5 1.6126e+07 5585.44 1.56017e+07 2551.57 1.00967e+07 1639.97 1.63713e+08 2122.99 9.31027e+06 1444.67 9.81771e+07 2025.16 8.78598e+06 21098.4 928835 1.37754e+06 9.34729e+06 3.53713e+07
46791 20220621.15 6397.4 8.40213e+07 20019.4 1.58639e+07 5665.02 1.53396e+07 2549.13 1.00967e+07 1601.71 1.62927e+08 2123.38 9.31027e+06 1415.65 9.81771e+07 1928.49 9.04813e+06 19934.2 876595 1.40572e+06 9.31748e+06 3.55556e+07
46798 20220621.18 6132.98 8.29727e+07 20152.9 1.6126e+07 5663.11 1.53396e+07 2551.27 9.83456e+06 1618.06 1.63189e+08 2132.93 9.31027e+06 1429.32 9.81771e+07 2020.55 8.78598e+06 19580.5 908764 1.40678e+06 9.30482e+06 3.58663e+07
46809 20220621.23 6400.34 8.37592e+07 19984.6 1.74367e+07 5566.3 1.53396e+07 2547.7 1.00967e+07 1612.33 1.63189e+08 2114.93 9.31027e+06 1431.55 9.73907e+07 1925.46 9.04813e+06 17312.3 910174 1.37689e+06 9.27528e+06 3.56788e+07
46816 20220621.26 6398.52 8.3497e+07 20254.4 1.56017e+07 5663.83 1.53396e+07 2558.67 9.83456e+06 1610.32 1.63189e+08 2120 9.31027e+06 1422.09 9.81771e+07 1931.17 9.04813e+06 21105.3 911270 1.34905e+06 9.34729e+06 3.63759e+07
46833 20220621.33 6439.5 8.37592e+07 20112.7 1.6126e+07 5491.63 1.50774e+07 2608.37 1.00967e+07 1604.5 1.62665e+08 2116.89 9.31027e+06 1431.67 9.81771e+07 1922.96 9.04813e+06 19755.4 888885 1.37173e+06 9.25018e+06 3.58669e+07
46845 20220621.38 6413.39 8.37592e+07 20030.1 1.66503e+07 5643.99 1.53396e+07 2533.64 1.00967e+07 1626.9 1.63975e+08 2113.35 9.04813e+06 1425.43 9.79149e+07 1922.68 1.08831e+07 19896.6 905553 1.3795e+06 9.26278e+06 2.65974e+07
46852 20220621.41 6253.41 8.3497e+07 19865.6 1.6126e+07 5596.92 1.50774e+07 2541.19 1.00967e+07 1622.48 1.62927e+08 2113.35 9.04813e+06 1436.07 9.81771e+07 1923.36 9.04813e+06 20423.9 904912 1.38678e+06 9.26697e+06 3.58669e+07
46867 20220622.2 6367.33 8.32349e+07 19806.3 1.63882e+07 5650.57 1.56017e+07 2547.38 1.00967e+07 1658.65 1.61092e+08 2126.39 9.31027e+06 1442.67 9.84392e+07 1979.17 9.04813e+06 19884.9 925269 1.39651e+06 9.32176e+06 3.59292e+07
46923 20220623.3 6412.19 8.42835e+07 19718.5 1.56017e+07 5529.76 1.53396e+07 2548.51 1.00967e+07 1606.2 1.6083e+08 2150.52 9.31027e+06 1428.4 9.87014e+07 1966.7 9.04813e+06 17422.6 907031 1.38014e+06 9.39441e+06 3.58669e+07
46944 20220623.11 6356.48 8.42835e+07 19329.8 1.6126e+07 5896.78 1.53396e+07 2546.33 1.00967e+07 1603.11 1.63713e+08 2118.8 9.31027e+06 1411.26 9.79149e+07 1880.41 1.08831e+07 17359.5 907066 1.37273e+06 9.27104e+06 3.55549e+07

max_msg_size_http

build_id build_number tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_v8_sgx_cft^ ls_v8_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_full_v8_sgx_cft^ ls_full_v8_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
46889 20220622.10 6601.67 8.45456e+07 19930.2 1.56017e+07 5694.6 1.56017e+07 2546.26 1.00967e+07 1654.93 1.61092e+08 2131.69 9.31027e+06 1472.31 9.81771e+07 1970.31 8.78598e+06 19493.2 886040 1.37182e+06 9.18386e+06 3.58669e+07
46898 20220622.14 6517.71 8.40213e+07 19749.1 1.63882e+07 5613 1.50774e+07 2546.97 1.00967e+07 1635.46 1.63189e+08 2196.32 9.31027e+06 1439.21 9.79149e+07 1933.26 1.0621e+07 17583.3 886114 1.37865e+06 9.26693e+06 3.58669e+07
46907 20220622.18 6317.27 8.29727e+07 19770.6 1.6126e+07 5943.28 1.56017e+07 2548.84 1.00967e+07 1632.85 1.62665e+08 2082 9.04813e+06 1429.75 9.79149e+07 2006.68 8.78598e+06 18445.8 890898 1.36661e+06 9.28377e+06 3.56794e+07
46938 20220623.9 6538.41 8.45456e+07 19691 1.63882e+07 5695.1 1.53396e+07 2545.98 1.00967e+07 1616.41 1.61092e+08 2112.55 9.31027e+06 1453.5 9.81771e+07 1928.38 8.78598e+06 19748.6 908798 1.36523e+06 9.2501e+06 3.55549e+07
46951 20220623.13 6411.63 8.3497e+07 19721.5 1.66503e+07 5862.82 1.56017e+07 2546.72 1.03588e+07 1618.79 1.62927e+08 2117.86 9.31027e+06 1422.64 9.79149e+07 1946.47 9.04813e+06 16757.5 901880 1.36188e+06 9.20032e+06 3.58669e+07

images

@jumaffre jumaffre added the 1.x-todo PRs which should be backported to 1.x label Jun 23, 2022
@jumaffre jumaffre merged commit f3afd63 into microsoft:main Jun 23, 2022
@github-actions
Copy link

💔 All backports failed

Status Branch Result
release/1.x An unhandled error occurred. Please see the logs for details
release/2.x An unhandled error occurred. Please see the logs for details

Manual backport

To create the backport manually run:

backport --pr 3941

Questions ?

Please refer to the Backport tool documentation

@jumaffre jumaffre added auto-backport Automatically backport this PR to LTS branch and removed 1.x-todo PRs which should be backported to 1.x auto-backport Automatically backport this PR to LTS branch labels Jun 23, 2022
@github-actions
Copy link

💔 All backports failed

Status Branch Result
release/2.x Backport failed because of merge conflicts

You might need to backport the following PRs to release/2.x:
- Reflect unsafe status in /node/version (#3942)
- Add missing #includes (#3842)

Manual backport

To create the backport manually run:

backport --pr 3941

Questions ?

Please refer to the Backport tool documentation

jumaffre added a commit to jumaffre/CCF that referenced this pull request Jun 23, 2022
@jumaffre jumaffre added backported This PR was successfully backported to LTS branch 1.x-todo PRs which should be backported to 1.x and removed 1.x-todo PRs which should be backported to 1.x labels Jun 23, 2022
jumaffre added a commit that referenced this pull request Jun 24, 2022
…st (#3941) (#3976)

* Restrict maximum size of client HTTP request (#3941)

* Fix build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x-todo PRs which should be backported to 2.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support setting maximum HTTP message size in config
3 participants