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

Scaling clusters: 1000's of services in env vars #3345

Closed
lavalamp opened this issue Jan 8, 2015 · 14 comments
Closed

Scaling clusters: 1000's of services in env vars #3345

lavalamp opened this issue Jan 8, 2015 · 14 comments
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@lavalamp
Copy link
Member

lavalamp commented Jan 8, 2015

Clearly you ought to be able to make more services in a k8s cluster than it is reasonable to pass to pods in env vars.

Possible solutions:

  • Segment by namespace
  • Require predeclarations

@bgrant0607 I know you hate env vars; do you have a preferred solution for this?

@thockin
Copy link
Member

thockin commented Jan 8, 2015

If we move env-var generation down to kubelet, this is less awful :)

@bgrant0607
Copy link
Member

My preferred solution is to eliminate the env vars. :-) That would also eliminate start-up-order dependencies (assuming clients could tolerate DNS lookup failures). I think even Docker buys that links aren't an acceptable long-term approach.

Barring that, segmentation by namespace seems like it should work if people use namespaces as intended.

We can reconsider predeclaration if neither of those approaches work.

Didn't @erictune already move the env-var generation to kubelet?

Note that we'll have scaling problems with iptables rules, too.

@thockin
Copy link
Member

thockin commented Jan 9, 2015

I tried to measure the impact of O(thousands) of iptables rules, but could
not find a decent way to measure it. It did not affect latency or
throughput in any obvious way.

On Thu, Jan 8, 2015 at 5:05 PM, bgrant0607 notifications@github.com wrote:

My preferred solution is to eliminate the env vars. :-) That would also
eliminate start-up-order dependencies (assuming clients could tolerate DNS
lookup failures). I think even Docker buys that links aren't an acceptable
long-term approach.

Barring that, segmentation by namespace seems like it should work if
people use namespaces as intended.

We can reconsider predeclaration if neither of those approaches work.

Didn't @erictune https://github.com/erictune already move the env-var
generation to kubelet?

Note that we'll have scaling problems with iptables rules, too.

Reply to this email directly or view it on GitHub
#3345 (comment)
.

@brendandburns
Copy link
Contributor

Now that we have DNS, I think it's reasonable to consider deprecating the
environment variables.

On Thu, Jan 8, 2015 at 7:58 PM, Tim Hockin notifications@github.com wrote:

I tried to measure the impact of O(thousands) of iptables rules, but could
not find a decent way to measure it. It did not affect latency or
throughput in any obvious way.

On Thu, Jan 8, 2015 at 5:05 PM, bgrant0607 notifications@github.com
wrote:

My preferred solution is to eliminate the env vars. :-) That would also
eliminate start-up-order dependencies (assuming clients could tolerate
DNS
lookup failures). I think even Docker buys that links aren't an
acceptable
long-term approach.

Barring that, segmentation by namespace seems like it should work if
people use namespaces as intended.

We can reconsider predeclaration if neither of those approaches work.

Didn't @erictune https://github.com/erictune already move the env-var
generation to kubelet?

Note that we'll have scaling problems with iptables rules, too.

Reply to this email directly or view it on GitHub
<
#3345 (comment)

.


Reply to this email directly or view it on GitHub
#3345 (comment)
.

@bgrant0607
Copy link
Member

Docker's networking proposal (Docker issue 9983 -- not linked to avoid noise on that issue) confirms that links will be deprecated in favor or "network-based discovery".

@derekwaynecarr
Copy link
Member

@pmorie - fyi

@pmorie
Copy link
Member

pmorie commented Jan 9, 2015

@lavalamp @bgrant0607 @thockin @derekwaynecarr I think predeclaration should be possible but you should also be able to opt out of it and get metadata / firewall rules for all visible services in your namespace

@lavalamp
Copy link
Member Author

lavalamp commented Jan 9, 2015

Also note that before we get rid of env vars, we have to solve a bootstrapping problem-- env vars are how SkyDNS knows where to find k8s master.

@bgrant0607
Copy link
Member

Bootstrapping could be resolved by the downward API #386, or by creating a magic link-local address for the master.

@pmorie
Copy link
Member

pmorie commented Jan 12, 2015

@lavalamp regarding the skydns use case, I think there's an orthogonal use-case to envs that exists, which is being able to state that a pod shouldn't start unless some services it depends on are ready.

@erictune
Copy link
Member

Services could later go down. Clients need to handle that. So there is
nothing but a false sense of correctness in offering a way for pod start to
block on a service ready
On Jan 12, 2015 2:55 PM, "Paul Morie" notifications@github.com wrote:

@lavalamp https://github.com/lavalamp regarding the skydns use case, I
think there's an orthogonal use-case to envs that exists, which is being
able to state that a pod shouldn't start unless some services it depends on
are ready.


Reply to this email directly or view it on GitHub
#3345 (comment)
.

@stp-ip
Copy link
Member

stp-ip commented Jan 13, 2015

I agree unavailable dependencies need to be handled on the client.
To not make an easy workaround, which ends in things as "but it worked as I defined service1 starts before service2", I would not provide dependency declarations/support yet. There are more concerning issues at hand and furthermore I'm not even sure, if dependencies should be handled by kubernetes.

@pmorie
Copy link
Member

pmorie commented Jan 13, 2015

@erictune @stp-ip Services can go down, and you won't even know if your pod started before an IP/port was allocated to an interesting service :)

@goltermann goltermann added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jan 14, 2015
@bgrant0607
Copy link
Member

We definitely need to segment by namespace.

We've also basically settled on predeclaration for people who want env. vars.: #1768.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

9 participants