{"action":"created","comment":{"url":"https://api.github.com/repos/istio/istio.io/pulls/comments/238314212","pull_request_review_id":180823871,"id":238314212,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODMxNDIxMg==","diff_hunk":"@@ -0,0 +1,81 @@\n+---\n+title: Sidestepping Dependency Ordering with AppSwitch\n+description: Addressing application startup ordering and startup latency using AppSwitch.\n+publishdate: 2018-11-28\n+subtitle:\n+attribution: Dinesh Subhraveti (AppOrbit and Columbia University)\n+weight: 78\n+keywords: [appswitch,performance]\n+---\n+\n+We are going through an interesting cycle of application decomposition and recomposition.  While the microservice paradigm is driving monolithic applications to be broken into separate individual services, the service mesh approach is helping them to be connected back together into well-structured applications.  As such, microservices are logically separate but not independent.  They are usually closely interdependent and taking them apart introduces many new concerns such as need for mutual authentication between services.  Istio directly addresses most of those issues.\n+\n+## Dependency ordering problem\n+\n+An issue that arises due to application decomposition and one that Istio doesn’t address is dependency ordering -- bringing up individual services of an application in an order that guarantees that the application as a whole comes up quickly and correctly.  In a monolithic application, with all its components built-in, dependency ordering between the components is enforced by internal locking mechanisms.  But with individual services potentially scattered across the cluster in a service mesh, starting a service first requires checking that the services it depends on are up and available.\n+\n+Dependency ordering is deceptively nuanced with a host of interrelated problems.  Ordering individual services requires having the dependency graph of the services so that they can be brought up starting from leaf nodes back to the root nodes.  It is not easy to construct such a graph and keep it updated over time as interdependencies evolve with the behavior of the application.  Even if the dependency graph is somehow provided, enforcing the ordering itself is not easy.  Simply starting the services in the specified order obviously won’t do.  A service may have started but not be ready to accept connections yet.  This is the problem with docker-compose's `depends-on` tag, for example.\n+\n+Apart from introducing sufficiently long sleeps between service startups, a common pattern that is often used is to check for readiness of dependencies before starting a service.  In Kubernetes, this is typically done as part of the init container of the pod.  However that means that the entire application would be held up until all its dependencies come alive.  Sometimes applications spend several minutes initializing themselves on startup before making their first outbound connection.  Not allowing a service to start adds substantial overhead to overall startup time of the application.  Also, checking for readiness of dependencies won’t work in case of \"multilevel\" interdependencies where a service needs to be started before another service but only after a third service.  Likewise, multiple containers of the same pod may have mutual dependencies that cannot be ordered by simply waiting at the init container.","path":"content/blog/2018/appswitch/index.md","position":19,"original_position":19,"commit_id":"79e84c78537197dd0be9c034388915f7c43e7744","original_commit_id":"79e84c78537197dd0be9c034388915f7c43e7744","user":{"login":"rshriram","id":8202871,"node_id":"MDQ6VXNlcjgyMDI4NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"body":"> In Kubernetes, this is typically done as part of the init container of the pod.\r\n\r\nThis does not sound right.. Assuming you are talking about cross microservice dependencies, there is no way in Kubernetes to express this requirement. The readiness checks simply ensures that the instance of a service is up before it enters the load balancing pool. I feel that this paragraph is missing some connecting pieces or skipping ahead, as the flow changes from \"service->service\" initialization order to suddenly \"intra-pod container start up order\".. While theoretically you can stick all services of an application into a single pod, it leads to a different kind of problem than what you set out to talk about. Kubernetes has started addressing the container startup ordering issue within a single pod, but not the cross service initialization order.","created_at":"2018-12-03T15:29:59Z","updated_at":"2018-12-03T15:29:59Z","html_url":"https://github.com/istio/istio.io/pull/2928#discussion_r238314212","pull_request_url":"https://api.github.com/repos/istio/istio.io/pulls/2928","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/istio/istio.io/pulls/comments/238314212"},"html":{"href":"https://github.com/istio/istio.io/pull/2928#discussion_r238314212"},"pull_request":{"href":"https://api.github.com/repos/istio/istio.io/pulls/2928"}}},"pull_request":{"url":"https://api.github.com/repos/istio/istio.io/pulls/2928","id":234462258,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NDYyMjU4","html_url":"https://github.com/istio/istio.io/pull/2928","diff_url":"https://github.com/istio/istio.io/pull/2928.diff","patch_url":"https://github.com/istio/istio.io/pull/2928.patch","issue_url":"https://api.github.com/repos/istio/istio.io/issues/2928","number":2928,"state":"open","locked":false,"title":"[Blog post] Sidestepping dependency ordering with AppSwitch","user":{"login":"subhraveti","id":4053470,"node_id":"MDQ6VXNlcjQwNTM0NzA=","avatar_url":"https://avatars2.githubusercontent.com/u/4053470?v=4","gravatar_id":"","url":"https://api.github.com/users/subhraveti","html_url":"https://github.com/subhraveti","followers_url":"https://api.github.com/users/subhraveti/followers","following_url":"https://api.github.com/users/subhraveti/following{/other_user}","gists_url":"https://api.github.com/users/subhraveti/gists{/gist_id}","starred_url":"https://api.github.com/users/subhraveti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subhraveti/subscriptions","organizations_url":"https://api.github.com/users/subhraveti/orgs","repos_url":"https://api.github.com/users/subhraveti/repos","events_url":"https://api.github.com/users/subhraveti/events{/privacy}","received_events_url":"https://api.github.com/users/subhraveti/received_events","type":"User","site_admin":false},"body":"This blog discusses how AppSwitch could be used to address service startup ordering and startup times.","created_at":"2018-11-28T23:43:59Z","updated_at":"2018-12-03T15:29:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1771d1726da0f05990b9a4a64366f29254d67cd6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"frankbu","id":2752495,"node_id":"MDQ6VXNlcjI3NTI0OTU=","avatar_url":"https://avatars2.githubusercontent.com/u/2752495?v=4","gravatar_id":"","url":"https://api.github.com/users/frankbu","html_url":"https://github.com/frankbu","followers_url":"https://api.github.com/users/frankbu/followers","following_url":"https://api.github.com/users/frankbu/following{/other_user}","gists_url":"https://api.github.com/users/frankbu/gists{/gist_id}","starred_url":"https://api.github.com/users/frankbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankbu/subscriptions","organizations_url":"https://api.github.com/users/frankbu/orgs","repos_url":"https://api.github.com/users/frankbu/repos","events_url":"https://api.github.com/users/frankbu/events{/privacy}","received_events_url":"https://api.github.com/users/frankbu/received_events","type":"User","site_admin":false},{"login":"rcaballeromx","id":10066027,"node_id":"MDQ6VXNlcjEwMDY2MDI3","avatar_url":"https://avatars1.githubusercontent.com/u/10066027?v=4","gravatar_id":"","url":"https://api.github.com/users/rcaballeromx","html_url":"https://github.com/rcaballeromx","followers_url":"https://api.github.com/users/rcaballeromx/followers","following_url":"https://api.github.com/users/rcaballeromx/following{/other_user}","gists_url":"https://api.github.com/users/rcaballeromx/gists{/gist_id}","starred_url":"https://api.github.com/users/rcaballeromx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcaballeromx/subscriptions","organizations_url":"https://api.github.com/users/rcaballeromx/orgs","repos_url":"https://api.github.com/users/rcaballeromx/repos","events_url":"https://api.github.com/users/rcaballeromx/events{/privacy}","received_events_url":"https://api.github.com/users/rcaballeromx/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":884247475,"node_id":"MDU6TGFiZWw4ODQyNDc0NzU=","url":"https://api.github.com/repos/istio/istio.io/labels/cla:%20yes","name":"cla: yes","color":"bfdadc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/istio/istio.io/pulls/2928/commits","review_comments_url":"https://api.github.com/repos/istio/istio.io/pulls/2928/comments","review_comment_url":"https://api.github.com/repos/istio/istio.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/istio/istio.io/issues/2928/comments","statuses_url":"https://api.github.com/repos/istio/istio.io/statuses/79e84c78537197dd0be9c034388915f7c43e7744","head":{"label":"subhraveti:appswitch","ref":"appswitch","sha":"79e84c78537197dd0be9c034388915f7c43e7744","user":{"login":"subhraveti","id":4053470,"node_id":"MDQ6VXNlcjQwNTM0NzA=","avatar_url":"https://avatars2.githubusercontent.com/u/4053470?v=4","gravatar_id":"","url":"https://api.github.com/users/subhraveti","html_url":"https://github.com/subhraveti","followers_url":"https://api.github.com/users/subhraveti/followers","following_url":"https://api.github.com/users/subhraveti/following{/other_user}","gists_url":"https://api.github.com/users/subhraveti/gists{/gist_id}","starred_url":"https://api.github.com/users/subhraveti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subhraveti/subscriptions","organizations_url":"https://api.github.com/users/subhraveti/orgs","repos_url":"https://api.github.com/users/subhraveti/repos","events_url":"https://api.github.com/users/subhraveti/events{/privacy}","received_events_url":"https://api.github.com/users/subhraveti/received_events","type":"User","site_admin":false},"repo":{"id":137539189,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc1MzkxODk=","name":"istio.github.io","full_name":"subhraveti/istio.github.io","private":false,"owner":{"login":"subhraveti","id":4053470,"node_id":"MDQ6VXNlcjQwNTM0NzA=","avatar_url":"https://avatars2.githubusercontent.com/u/4053470?v=4","gravatar_id":"","url":"https://api.github.com/users/subhraveti","html_url":"https://github.com/subhraveti","followers_url":"https://api.github.com/users/subhraveti/followers","following_url":"https://api.github.com/users/subhraveti/following{/other_user}","gists_url":"https://api.github.com/users/subhraveti/gists{/gist_id}","starred_url":"https://api.github.com/users/subhraveti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subhraveti/subscriptions","organizations_url":"https://api.github.com/users/subhraveti/orgs","repos_url":"https://api.github.com/users/subhraveti/repos","events_url":"https://api.github.com/users/subhraveti/events{/privacy}","received_events_url":"https://api.github.com/users/subhraveti/received_events","type":"User","site_admin":false},"html_url":"https://github.com/subhraveti/istio.github.io","description":"Source for the istio.io site","fork":true,"url":"https://api.github.com/repos/subhraveti/istio.github.io","forks_url":"https://api.github.com/repos/subhraveti/istio.github.io/forks","keys_url":"https://api.github.com/repos/subhraveti/istio.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/subhraveti/istio.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/subhraveti/istio.github.io/teams","hooks_url":"https://api.github.com/repos/subhraveti/istio.github.io/hooks","issue_events_url":"https://api.github.com/repos/subhraveti/istio.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/subhraveti/istio.github.io/events","assignees_url":"https://api.github.com/repos/subhraveti/istio.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/subhraveti/istio.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/subhraveti/istio.github.io/tags","blobs_url":"https://api.github.com/repos/subhraveti/istio.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/subhraveti/istio.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/subhraveti/istio.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/subhraveti/istio.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/subhraveti/istio.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/subhraveti/istio.github.io/languages","stargazers_url":"https://api.github.com/repos/subhraveti/istio.github.io/stargazers","contributors_url":"https://api.github.com/repos/subhraveti/istio.github.io/contributors","subscribers_url":"https://api.github.com/repos/subhraveti/istio.github.io/subscribers","subscription_url":"https://api.github.com/repos/subhraveti/istio.github.io/subscription","commits_url":"https://api.github.com/repos/subhraveti/istio.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/subhraveti/istio.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/subhraveti/istio.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/subhraveti/istio.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/subhraveti/istio.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/subhraveti/istio.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/subhraveti/istio.github.io/merges","archive_url":"https://api.github.com/repos/subhraveti/istio.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/subhraveti/istio.github.io/downloads","issues_url":"https://api.github.com/repos/subhraveti/istio.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/subhraveti/istio.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/subhraveti/istio.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/subhraveti/istio.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/subhraveti/istio.github.io/labels{/name}","releases_url":"https://api.github.com/repos/subhraveti/istio.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/subhraveti/istio.github.io/deployments","created_at":"2018-06-15T23:14:36Z","updated_at":"2018-11-28T21:30:58Z","pushed_at":"2018-11-30T19:28:04Z","git_url":"git://github.com/subhraveti/istio.github.io.git","ssh_url":"git@github.com:subhraveti/istio.github.io.git","clone_url":"https://github.com/subhraveti/istio.github.io.git","svn_url":"https://github.com/subhraveti/istio.github.io","homepage":"https://istio.io/","size":36155,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"istio:master","ref":"master","sha":"0e96e6e945b07b1cbc112a6f9383a680b026519c","user":{"login":"istio","id":23534644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0NjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"repo":{"id":82706976,"node_id":"MDEwOlJlcG9zaXRvcnk4MjcwNjk3Ng==","name":"istio.io","full_name":"istio/istio.io","private":false,"owner":{"login":"istio","id":23534644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0NjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/istio/istio.io","description":"Source for the istio.io site","fork":false,"url":"https://api.github.com/repos/istio/istio.io","forks_url":"https://api.github.com/repos/istio/istio.io/forks","keys_url":"https://api.github.com/repos/istio/istio.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/istio/istio.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/istio/istio.io/teams","hooks_url":"https://api.github.com/repos/istio/istio.io/hooks","issue_events_url":"https://api.github.com/repos/istio/istio.io/issues/events{/number}","events_url":"https://api.github.com/repos/istio/istio.io/events","assignees_url":"https://api.github.com/repos/istio/istio.io/assignees{/user}","branches_url":"https://api.github.com/repos/istio/istio.io/branches{/branch}","tags_url":"https://api.github.com/repos/istio/istio.io/tags","blobs_url":"https://api.github.com/repos/istio/istio.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/istio/istio.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/istio/istio.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/istio/istio.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/istio/istio.io/statuses/{sha}","languages_url":"https://api.github.com/repos/istio/istio.io/languages","stargazers_url":"https://api.github.com/repos/istio/istio.io/stargazers","contributors_url":"https://api.github.com/repos/istio/istio.io/contributors","subscribers_url":"https://api.github.com/repos/istio/istio.io/subscribers","subscription_url":"https://api.github.com/repos/istio/istio.io/subscription","commits_url":"https://api.github.com/repos/istio/istio.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/istio/istio.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/istio/istio.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/istio/istio.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/istio/istio.io/contents/{+path}","compare_url":"https://api.github.com/repos/istio/istio.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/istio/istio.io/merges","archive_url":"https://api.github.com/repos/istio/istio.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/istio/istio.io/downloads","issues_url":"https://api.github.com/repos/istio/istio.io/issues{/number}","pulls_url":"https://api.github.com/repos/istio/istio.io/pulls{/number}","milestones_url":"https://api.github.com/repos/istio/istio.io/milestones{/number}","notifications_url":"https://api.github.com/repos/istio/istio.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/istio/istio.io/labels{/name}","releases_url":"https://api.github.com/repos/istio/istio.io/releases{/id}","deployments_url":"https://api.github.com/repos/istio/istio.io/deployments","created_at":"2017-02-21T17:19:49Z","updated_at":"2018-12-03T02:27:31Z","pushed_at":"2018-12-03T13:42:14Z","git_url":"git://github.com/istio/istio.io.git","ssh_url":"git@github.com:istio/istio.io.git","clone_url":"https://github.com/istio/istio.io.git","svn_url":"https://github.com/istio/istio.io","homepage":"https://istio.io/","size":38345,"stargazers_count":160,"watchers_count":160,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":405,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":405,"open_issues":95,"watchers":160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/istio/istio.io/pulls/2928"},"html":{"href":"https://github.com/istio/istio.io/pull/2928"},"issue":{"href":"https://api.github.com/repos/istio/istio.io/issues/2928"},"comments":{"href":"https://api.github.com/repos/istio/istio.io/issues/2928/comments"},"review_comments":{"href":"https://api.github.com/repos/istio/istio.io/pulls/2928/comments"},"review_comment":{"href":"https://api.github.com/repos/istio/istio.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/istio/istio.io/pulls/2928/commits"},"statuses":{"href":"https://api.github.com/repos/istio/istio.io/statuses/79e84c78537197dd0be9c034388915f7c43e7744"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rshriram"}}