stackabletech / stackabletech/hdfs-operator

Improve data locality by considering Kubernetes topology

Aperta
#595 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

customer-request
Lingua principale
Rust
Stelle
53
Fork
9
Merge medio
1g 13h
PR unite (30g)
10

Descrizione

Description

As users of the HDFS operator and a Stackable deployed HDFS we want it to ensure data locality by talking to a DataNode on the same Kubernetes node as the client first if one exists.

Value

HDFS tries to store the first copy of a block on a "local" machine before shipping data to remote machines over the network. This relies on a simple IP address comparison in the HDFS code which breaks due to the nature of Kubernetes where pods don't share the same IP even if they are on the same Kubernetes node.

I believe we can improve this situation by changing the HDFS code to consider the Kubernetes node while looking for a "local" machine.

We already have precedent with the hdfs-topology-provider which does something similar. I believe we can plug this logic into the chooseLocalOrFavoredStorage method of BlockPlacementPolicyDefault.

We want this because it will probably benefit all workloads that are using HDFS and locally attached storage and that are using things like Spark or HBase where processing can happen on the same Kubernetes node as the storage. The benefit is going to be less network traffic and a boost in performance.

Dependencies

It probably makes sense to reuse code from the hdfs-topology-provider project.

Tasks

  • Understand exactly what the topology provider is doing: We need a way - from within Kubernetes - to get the node a client is "calling" from (via its IP) as well as the node the DataNodes are running on
  • Decide whether this behavior is going to be enabled by default or not
  • Discuss the best point where to plug this behavior in and create a patch or pluggable class (etc. a BlockPlacementPolicy)
  • Document the behavior
  • Test it on a multi-node cluster and also test it with external clients (listener etc.)
  • Marketing: Discuss with marketing whether we should create a blog post about it

Acceptance Criteria

  • We have a way to compare data locality based on Kubernetes nodes that falls back to the default in case there is an error
  • The behavior is documented even if it is not changeable/pluggable

Release Notes

The HDFS NameNodes will now look at the Kubernetes topology when considering whether a client request is made locally or not. This means it will consider all clients "local" that are hosted on the same Kubernetes node as a DataNode.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia comprendendo il comportamento di hdfs-topology-provider e del metodo BlockPlacementPolicyDefault.chooseLocalOrFavoredStorage indicato nella issue. Determina come vengono confrontati i nodi Kubernetes del client e del DataNode, inclusi i client esterni e il fallback in caso di errore, quindi esegui il test su un cluster multi-nodo. Il lavoro è completato quando la località funziona con il fallback predefinito e il comportamento è documentato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
kubernetes
Ambito
distributed-systems, infrastructure
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.