Skip to content

Why serverless containers instead of pods? #1794

Closed

Description

@josephburnett

Expected Behavior

As a Developer, I may have decomposed my application into several containers. E.g. one for serving HTTP requests and one for processing background tasks.

Actual Behavior

But Knative only accepts a single Container spec. Why?

Additional Info

Container in Revision spec

Activity

  1. added
    area/API
    kind/question
    on Aug 3, 2018
  2. josephburnett commented on Aug 3, 2018

    @josephburnett
    ContributorAuthor

    This wasn't originally my question. @kelseyhightower pointed this out during one of our hackathons and it's been rattling around in my head ever since.

    Perhaps there's a really good answer (but I don't have it).

  3. josephburnett commented on Aug 3, 2018

    @josephburnett
    ContributorAuthor

    @mattmoor @vaikas-google @evankanderson

  4. added
    kind/spec
    on Aug 3, 2018
  5. mattmoor commented on Aug 3, 2018

    @mattmoor
    Contributor
  6. sixolet commented on Aug 3, 2018

    @sixolet
    Contributor

    I think we were aiming for simplicity. Knative actually may load more into the pod with your application-level container, but those things are usually plumbing (envoy, etc), not application code.

    "Processing background tasks" is interesting; my naïve understanding of how you'd arrange that in (the eventual form of) Knative is as a separate Service loosely coupled with the serving Service using the Eventing system. They'd then each scale as appropriate for their own needs. Putting the two in the same pod would seem odd to me.

  7. josephburnett commented on Aug 3, 2018

    @josephburnett
    ContributorAuthor

    Putting the two in the same pod would seem odd to me.

    Suppose that I have an application that reports usage on a best-effort basis. Every time I get an HTTP request, my application generates a number of events to upload. I also want the team that owns the reporting service to own the reporting client, so I give them a separate container in my application and just push the events to localhost:whatever before returning the HTTP call. Their highly-available client (because it's running locally) enqueues the events and uploads them to the service in the background.

  8. evankanderson commented on Aug 3, 2018

    @evankanderson
    Member
  9. mattmoor commented on Aug 29, 2018

    @mattmoor
    Contributor

    cc @krancour see @evankanderson's answer above

  10. evankanderson commented on Aug 29, 2018

    @evankanderson
    Member

    To follow up on #1951 (comment), it would be good to call out the components of Knative today which would be useful to make available independently (i.e. is queue a useful sidecar, should it be rolled into Istio/Knative Routing Primitives?).

    We're already looking at making both the autoscaler and log collection/monitoring able to work well stand-alone -- we're building those tools because we need them, not because they are core to knative/serving's "stateless triggered container execution". It's worth calling out other components that make sense to separate; the idea is that autoscaler and observability should work fine with native k8s Deployments, for example.

  11. cppforlife commented on Sep 13, 2018

    @cppforlife
    Contributor

    shared google doc "Knative Serving: Container vs Pod Spec" with knative-dev@ google group.

  12. evankanderson commented on Sep 14, 2018

    @evankanderson
    Member
  13. mattmoor commented on Oct 31, 2018

    @mattmoor
    Contributor

    Discussed with @evankanderson and going to close until a concrete scenario comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIkind/questionkind/spec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions