When the webhdfs server in NN serves an OPEN request, the NN will eventually redirect the request to a DN. The current implementation intends to choose the active DNs. The code always connects to the DN in a deterministic order to see whether it is active during redirection.
Although it reduces the chance of the client from connecting to a failed DN, this is problematic because:
- It has no guarantees that the client can connect to that DN even if the NN can connect to it.
- It requires an additional network round-trip for every OPEN / CREATE request.
This jira proposes that the NN should choose the DN based on the information of the data node manager.