{"action":"closed","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/264","repository_url":"https://api.github.com/repos/Mashape/kong","labels_url":"https://api.github.com/repos/Mashape/kong/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/264/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/264/events","html_url":"https://github.com/Mashape/kong/issues/264","id":81187121,"number":264,"title":"Cache Locks","user":{"login":"thefosk","id":964813,"avatar_url":"https://avatars.githubusercontent.com/u/964813?v=3","gravatar_id":"","url":"https://api.github.com/users/thefosk","html_url":"https://github.com/thefosk","followers_url":"https://api.github.com/users/thefosk/followers","following_url":"https://api.github.com/users/thefosk/following{/other_user}","gists_url":"https://api.github.com/users/thefosk/gists{/gist_id}","starred_url":"https://api.github.com/users/thefosk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefosk/subscriptions","organizations_url":"https://api.github.com/users/thefosk/orgs","repos_url":"https://api.github.com/users/thefosk/repos","events_url":"https://api.github.com/users/thefosk/events{/privacy}","received_events_url":"https://api.github.com/users/thefosk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mashape/kong/labels/area/DAO","name":"area/DAO","color":"d4c5f9"},{"url":"https://api.github.com/repos/Mashape/kong/labels/area/resolver","name":"area/resolver","color":"d4c5f9"},{"url":"https://api.github.com/repos/Mashape/kong/labels/task/enhancement","name":"task/enhancement","color":"bfdadc"}],"state":"closed","locked":false,"assignee":{"login":"thefosk","id":964813,"avatar_url":"https://avatars.githubusercontent.com/u/964813?v=3","gravatar_id":"","url":"https://api.github.com/users/thefosk","html_url":"https://github.com/thefosk","followers_url":"https://api.github.com/users/thefosk/followers","following_url":"https://api.github.com/users/thefosk/following{/other_user}","gists_url":"https://api.github.com/users/thefosk/gists{/gist_id}","starred_url":"https://api.github.com/users/thefosk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefosk/subscriptions","organizations_url":"https://api.github.com/users/thefosk/orgs","repos_url":"https://api.github.com/users/thefosk/repos","events_url":"https://api.github.com/users/thefosk/events{/privacy}","received_events_url":"https://api.github.com/users/thefosk/received_events","type":"User","site_admin":false},"assignees":[{"login":"thefosk","id":964813,"avatar_url":"https://avatars.githubusercontent.com/u/964813?v=3","gravatar_id":"","url":"https://api.github.com/users/thefosk","html_url":"https://github.com/thefosk","followers_url":"https://api.github.com/users/thefosk/followers","following_url":"https://api.github.com/users/thefosk/following{/other_user}","gists_url":"https://api.github.com/users/thefosk/gists{/gist_id}","starred_url":"https://api.github.com/users/thefosk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefosk/subscriptions","organizations_url":"https://api.github.com/users/thefosk/orgs","repos_url":"https://api.github.com/users/thefosk/repos","events_url":"https://api.github.com/users/thefosk/events{/privacy}","received_events_url":"https://api.github.com/users/thefosk/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Mashape/kong/milestones/10","html_url":"https://github.com/Mashape/kong/milestones/0.9","labels_url":"https://api.github.com/repos/Mashape/kong/milestones/10/labels","id":1770036,"number":10,"title":"0.9","description":"","creator":{"login":"sinzone","id":1213643,"avatar_url":"https://avatars.githubusercontent.com/u/1213643?v=3","gravatar_id":"","url":"https://api.github.com/users/sinzone","html_url":"https://github.com/sinzone","followers_url":"https://api.github.com/users/sinzone/followers","following_url":"https://api.github.com/users/sinzone/following{/other_user}","gists_url":"https://api.github.com/users/sinzone/gists{/gist_id}","starred_url":"https://api.github.com/users/sinzone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinzone/subscriptions","organizations_url":"https://api.github.com/users/sinzone/orgs","repos_url":"https://api.github.com/users/sinzone/repos","events_url":"https://api.github.com/users/sinzone/events{/privacy}","received_events_url":"https://api.github.com/users/sinzone/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":21,"state":"open","created_at":"2016-05-16T22:20:01Z","updated_at":"2016-07-20T06:21:38Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-05-26T23:41:12Z","updated_at":"2016-07-20T06:21:38Z","closed_at":"2016-07-20T06:21:38Z","body":"Currently Kong uses an in-memory cache to avoid making request to the database every time an entity is requested by the system. \r\n\r\nThis might lead to a performance loss in a very specific edge-case when lots of incoming requests are being sent to Kong, that triggers simultaneous cache misses which in turn triggers multiple requests to the database, basically DDosing the database and slowing down Kong itself (also called the **Dogpile effect**). \r\n\r\nOne of the many examples where this happens is when lots of connections are being sent to an API that has never been loaded into memory before.\r\n\r\nThe cache client should leverage locks to make sure only one request is being sent to the database everytime, possibly using this module: https://github.com/openresty/lua-resty-lock\r\n\r\nThis might also be related to #15."}}
{"actor":{"display_login":"Tieske"}}