Skip to content

Set custom target duration for workspace owned endpoints

List of workspace owned endpoints with percentile duration, count & assignees
Assignee json.meta.caller_id.keyword Count 99.5th percentile of json.duration_s 99.8th percentile of json.duration_s Done
@abdwdd GET /api/:version/projects/:id 93,100,880 1.05937 1.69109
@abdwdd ProjectsController#show 15,986,577 2.52937 5.06596
@abdwdd GET /api/:version/users/:id 13,113,774 0.2669 0.47297
@abdwdd GET /api/:version/users 13,113,132 1.14146 1.70484
@abdwdd GET /api/:version/projects 13,108,440 7.82867 9.81246
@abdwdd GET /api/:version/user 10,610,815 0.39961 1.00027
@abdwdd GET /api/:version/users/:user_id/status 10,040,461 0.10754 0.18678
@abdwdd GET /api/:version/groups/:id/projects 8,824,978 5.85517 6.86789
@abdwdd GET /api/:version/projects/:id/events 7,735,495 1.45651 1.8584
@abdwdd GET /api/:version/groups/:id 5,150,970 3.73052 4.94272
@abdwdd GroupsController#show 4,949,985 2.83309 5.00538
@abdwdd UsersController#show 3,965,024 1.72251 3.24759
@abdwdd Explore::ProjectsController#index 2,791,210 1.75478 3.8705
@abdwdd AutocompleteController#users 2,739,064 0.50779 0.92261
@abdwdd Groups::ChildrenController#index 2,203,037 3.62021 5.31476
@abdwdd GET /api/:version/groups/:id/subgroups 1,947,576 3.93619 4.92143
@abdwdd GET /api/:version/users/:user_id/projects 1,683,247 1.14394 1.73706
@alexpooley GET /api/:version/events 1,420,575 0.54984 1.61813 FALSE
@alexpooley GET /api/:version/groups 1,367,014 11.58713 12.15611 FALSE
@alexpooley UsersController#activity 1,001,540 1.28216 1.80703 FALSE
@alexpooley UsersController#projects 775,857 1.57519 2.99734 FALSE
@alexpooley ProjectsController#activity 755,177 2.48891 4.76119 FALSE
@alexpooley GET /api/:version/projects/:id/badges 658,844 0.8669 1.32858 FALSE
@alexpooley UsersController#calendar 598,567 0.25509 0.47564 FALSE
@alexpooley GET /api/:version/users/:id/events 581,287 1.07614 1.53928 FALSE
@alexpooley Dashboard::ProjectsController#index 425,211 4.89864 8.96423 FALSE
@alexpooley PUT /api/:version/projects/:id 375,620 1.57786 2.50053 FALSE
@alexpooley GET /api/:version/namespaces/:namespace/exists 353,713 30.58513 35.42726 FALSE
@alexpooley ProjectsController#edit 291,023 3.98361 5.55277 FALSE
@alexpooley GET /api/:version/avatar 231,637 0.12732 0.21486 FALSE
@alexpooley GET /api/:version/groups/:id/descendant_groups 200,797 2.20826 2.95435 FALSE
@alexpooley ProjectsController#new 192,679 3.91722 5.83171 FALSE
@alexpooley UsersController#groups 183,580 4.18367 5.1677 FALSE
@alexpooley Projects::AutocompleteSourcesController#members 181,951 3.10514 4.30266 FALSE
@serenafang Projects::AvatarsController#show 177,242 0.71481 2.90803 FALSE
@serenafang ProfilesController#show 171,025 2.55528 4.37404 FALSE
@serenafang Dashboard::GroupsController#index 168,576 1.4943 2.71653 FALSE
@serenafang DELETE /api/:version/projects/:id 156,031 1.13783 1.67743 FALSE
@serenafang Projects::StarrersController#index 131,076 1.57801 2.95205 FALSE
@serenafang DashboardController#activity 130,691 4.1129 6.20465 FALSE
@serenafang UsersController#contributed 124,881 2.52974 4.93816 FALSE
@serenafang GroupsController#activity 120,022 12.63074 14.14131 FALSE
@serenafang POST /api/:version/projects/:id/invitations 116,938 1.36445 1.89794 FALSE
@serenafang ProjectsController#create 111,616 15.7071 23.17206 FALSE
@serenafang AutocompleteController#project_groups 108,133 0.15346 0.2359 FALSE
@serenafang Profiles::KeysController#index 107,590 3.32338 4.55977 FALSE
@serenafang Profiles::PreferencesController#show 100,065 2.19089 4.25577 FALSE
@serenafang UsersController#followers 96,861 0.69253 1.07758 FALSE
@serenafang UsersController#following 95,232 0.63762 1.02239 FALSE
@serenafang UsersController#starred 93,769 0.8491 1.40772 FALSE
@serenafang GET /api/:version/namespaces/:id 89,241 1.21766 2.05704 FALSE
@manojmj POST /api/:version/projects 83,560 7.55789 15.33274
@manojmj GET /api/:version/user/emails 77,459 0.16386 0.28517
@manojmj UsersController#exists 77,307 0.05566 0.09315
@manojmj Dashboard::ProjectsController#starred 72,931 5.68369 8.9324
@manojmj PUT /api/:version/groups/:id 69,127 3.18384 4.11138
@manojmj POST /api/:version/groups 68,146 2.47837 4.02736
@manojmj Explore::ProjectsController#starred 67,468 1.77085 3.1845
@manojmj GET /api/:version/namespaces 56,637 2.16204 2.9386
@manojmj Profiles::AccountsController#show 54,689 2.04696 4.28633
@manojmj ProjectsController#update 52,350 2.82776 4.62182
@manojmj Explore::ProjectsController#topic 48,652 2.45641 4.71084
@manojmj ProfilesController#update 48,448 0.57916 1.05857
@manojmj Profiles::KeysController#create 47,772 1.38518 3.11132
@manojmj Groups::UploadsController#show 41,783 1.58983 2.06077
@manojmj GroupsController#edit 41,481 3.74786 5.31615
@manojmj GET /api/:version/groups/:id/badges 40,033 0.33895 0.63679
@manojmj Profiles::PreferencesController#update 36,421 0.21359 0.38441
@mksionek POST /api/:version/groups/:id/invitations 35,381 1.6975 2.60026
@mksionek UsersController#calendar_activities 34,131 1.40009 3.02005
@mksionek GroupsController#create 32,065 4.75473 7.05915
@mksionek ProjectsController#destroy 28,419 2.12098 4.30169
@mksionek PUT /api/:version/users/:id/custom_attributes/:key 28,038 0.35996 0.57872
@mksionek Groups::SharedProjectsController#index 27,202 0.94276 1.39324
@mksionek Explore::GroupsController#index 25,089 11.96455 12.38804
@mksionek GroupsController#new 23,056 2.78644 4.77355
@mksionek HEAD /api/:version/projects/:id 22,426 2.08882 3.85417
@mksionek Explore::ProjectsController#trending 16,447 1.67801 3.63657
@mksionek HEAD /api/:version/groups/:id/projects 14,762 2.77396 3.97395
@mksionek Profiles::EmailsController#index 13,729 1.89107 3.89805
@mksionek GET /api/:version/users/:user_id/memberships 12,413 0.21935 0.36944
@mksionek GroupsController#update 8,820 5.15273 11.31634
@mksionek POST /api/:version/projects/:id/badges 8,598 0.89358 1.33818
@mksionek GET /api/:version/projects/:id/badges/:badge_id 8,518 1.13602 1.52739
@mksionek PUT /api/:version/users/:id 8,258 0.77664 1.28064
@peterhegman Projects::LearnGitlabController#index 7,389 2.19472 4.81248
@peterhegman DELETE /api/:version/groups/:id 7,322 0.63161 0.99
@peterhegman DELETE /api/:version/projects/:id/badges/:badge_id 7,319 0.54671 0.89263
@peterhegman ProjectsController#toggle_star 7,151 0.91423 2.32033
@peterhegman AutocompleteController#projects 6,977 0.29585 0.43146
@peterhegman PUT /api/:version/namespaces/:id 6,698 1.64041 2.42389
@peterhegman HEAD /api/:version/user 6,247 0.38569 0.71337
@peterhegman POST /api/:version/projects/:id/unarchive 6,229 0.90405 1.42148
@peterhegman ProjectsController#transfer 5,868 32.28066 35.38824
@peterhegman PUT /api/:version/projects/:id/badges/:badge_id 5,379 1.54004 1.94394
@peterhegman GroupsController#projects 4,608 2.95869 5.47828
@peterhegman Explore::ProjectsController#topics 4,194 2.09986 3.78675
@peterhegman ProjectsController#archive 4,038 3.17028 4.60723
@peterhegman PUT /api/:version/user/preferences 3,859 0.19356 0.2828
@peterhegman Dashboard::ProjectsController#removed 3,624 1.92036 3.79999
@peterhegman GET /api/:version/users/:user_id/starred_projects 3,493 1.57088 2.15764
@peterhegman GroupsController#destroy 3,488 0.69026 1.28388

Problem

As part of gitlab-com/gl-infra/scalability#1451, we need to set custom target duration for web & API requests.

How to assign urgency

The process is described here but for convenience I have added 99.8/99.5 percentiles, count (past 7 days) and the endpoints to the above table from kibana.

We need to set urgencies to all the above endpoints. For API requests, check the values under 99.5th percentile column and for web requests check the values under 99.8th percentile column to see how the endpoint is performing. This table has the available urgencies.

Ideally, the endpoint with higher request count should have higher urgency but some endpoints like GET /api/:version/projects/:id might not be performing optimally so we need to create or find an existing performance issue for the endpoint & add it to this epic to track all such issues. We can then set a lower urgency temporarily and link the issue inside the code. If the endpoint is performing optimally we can set a higher urgency. For instance, GET /api/:version/users/:id can be set to medium urgency.

The endpoints with lower number of requests should be set to default or can even be set to low urgency if there are only few thousands requests and the percentile duration is greater than default.

Sample MR for reference

!84418 (merged)

Edited by Abdul Wadood