{"action":"created","issue":{"url":"https://api.github.com/repos/nodezoo/nodezoo-system/issues/40","repository_url":"https://api.github.com/repos/nodezoo/nodezoo-system","labels_url":"https://api.github.com/repos/nodezoo/nodezoo-system/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/nodezoo/nodezoo-system/issues/40/comments","events_url":"https://api.github.com/repos/nodezoo/nodezoo-system/issues/40/events","html_url":"https://github.com/nodezoo/nodezoo-system/issues/40","id":149588104,"number":40,"title":"Recovery of Failed Services","user":{"login":"Georgette","id":3783903,"avatar_url":"https://avatars.githubusercontent.com/u/3783903?v=3","gravatar_id":"","url":"https://api.github.com/users/Georgette","html_url":"https://github.com/Georgette","followers_url":"https://api.github.com/users/Georgette/followers","following_url":"https://api.github.com/users/Georgette/following{/other_user}","gists_url":"https://api.github.com/users/Georgette/gists{/gist_id}","starred_url":"https://api.github.com/users/Georgette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Georgette/subscriptions","organizations_url":"https://api.github.com/users/Georgette/orgs","repos_url":"https://api.github.com/users/Georgette/repos","events_url":"https://api.github.com/users/Georgette/events{/privacy}","received_events_url":"https://api.github.com/users/Georgette/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-19T21:22:17Z","updated_at":"2016-04-19T21:37:46Z","closed_at":null,"body":"Not sure where this belongs, but wanted to document it somewhere.\r\n\r\nIf any one of the services fails, for example, I had an issue with the github service failing due handling the data, and not accounting for certain scenarios. When this happens, obviously we can restart the service, but in the case of the npm updater, how do we not lose data while a service is recovering, because the updater doesn't know about the services failing? \r\n\r\nThis also comes paired with scaling the services so we have multiple copies of services for bulk loading data from npm. \r\n\r\nIt feels like we need a leader, or a puppet, that directs the message traffic for both load balance, and service recovery. "},"comment":{"url":"https://api.github.com/repos/nodezoo/nodezoo-system/issues/comments/212140104","html_url":"https://github.com/nodezoo/nodezoo-system/issues/40#issuecomment-212140104","issue_url":"https://api.github.com/repos/nodezoo/nodezoo-system/issues/40","id":212140104,"user":{"login":"mcdonnelldean","id":3625961,"avatar_url":"https://avatars.githubusercontent.com/u/3625961?v=3","gravatar_id":"","url":"https://api.github.com/users/mcdonnelldean","html_url":"https://github.com/mcdonnelldean","followers_url":"https://api.github.com/users/mcdonnelldean/followers","following_url":"https://api.github.com/users/mcdonnelldean/following{/other_user}","gists_url":"https://api.github.com/users/mcdonnelldean/gists{/gist_id}","starred_url":"https://api.github.com/users/mcdonnelldean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcdonnelldean/subscriptions","organizations_url":"https://api.github.com/users/mcdonnelldean/orgs","repos_url":"https://api.github.com/users/mcdonnelldean/repos","events_url":"https://api.github.com/users/mcdonnelldean/events{/privacy}","received_events_url":"https://api.github.com/users/mcdonnelldean/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T21:37:46Z","updated_at":"2016-04-19T21:37:46Z","body":"It depends on the microserice. Npm, Github, and Travis are all backed by redis, search by elasticsearch.\r\n\r\nIn the case of the updater, modules downloaded via the download all function should be first placed in redis (just like in github) and then batched to the queue. The queue itself is redis based so it is hard saved. \r\n\r\nWe will still lose some data in transit but this is ok, the nature of modules is eventual consistency. We will also be offering a sync button to modules who's cache is outside a certain timeframe. This means we can override an update in case of loss."}}