GitHub user aicam added a comment to the discussion: Proposal - Supporting user-provided ML models in workflows
In Kubernetes (K8s), calling both a "microservice" is fine from an architectural standpoint, but their operational behavior and scheduling strategies in a cluster are fundamentally different. 1. Node Placement & Scheduling Rules DaemonSet: Kubernetes automatically schedules exactly one pod on every single node (or a targeted subset of nodes matching specific labels/selectors). If you have 5 nodes, you get 5 instances—one per node. Standard Microservice (Deployment): The K8s Scheduler decides where pods land based on available CPU/memory, node affinity, or anti-affinity rules. One node might run three instances, while another node runs zero. 2. Scaling Dynamics DaemonSet: Scales implicitly with your infrastructure. When a new physical or virtual node is added to the cluster, K8s immediately provisions a DaemonSet pod onto that new node without manual intervention. Standard Microservice (Deployment): Scales explicitly based on application traffic or workload demand (e.g., via a Horizontal Pod Autoscaler based on CPU usage or custom metrics), completely independent of how many nodes exist in the cluster. 3. Network Routing & Locality DaemonSet: Often uses hostNetwork: true or hostPort to attach directly to the local node's host interface. Applications on that node usually reach out to localhost to talk to the local daemon instance. Standard Microservice (Deployment): Sits behind a Kubernetes Service with an internal ClusterIP. Incoming requests are round-robined across any available pod in the cluster regardless of which node it is running on. For example in Texera, we have `config-service` as a `Deployment`, it sits behind Envoy Gateway, receives requests from users and connects to Postgres but does not have any access to node network or operating system. In contrast, mounter which is a `DaemonSet`, it does not receive request from public users (only from `access-control` service), does not connect to Postgres but it has full access to node file system and can modify K8s volumes. GitHub link: https://github.com/apache/texera/discussions/6616#discussioncomment-18033773 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
