Skip to content

[Core]Separate Environment Variables for ray.init() and ray ctl to Reflect Different Protocols and Ports #53226

@Louis-Zhu

Description

@Louis-Zhu

Description

Currently, both ray.init() and ray ctl rely on the same environment variable RAY_ADDRESS to determine the default address to connect to a Ray cluster. However, in practice:

ray.init() uses the ray:// protocol and connects via the GCS gRPC port (default 10001)
ray ctl uses the HTTP protocol (http://) and connects via the Dashboard port (default 8265)
This leads to potential confusion when setting the RAY_ADDRESS environment variable, as it may not be valid for both tools simultaneously. For example, setting RAY_ADDRESS=http://localhost:8265 would work for ray ctl, but not for ray.init(), which expects a ray:// URI with the GCS port.

Suggestion
To improve usability and reduce ambiguity, I propose that we separate the environment variables used by these two interfaces:

Use RAY_ADDRESS for ray.init() (defaulting to ray://localhost:10001)
Use RAY_DASHBOARD_ADDRESS for ray ctl (defaulting to http://localhost:8265)
This change would allow users and applications to configure connection addresses independently based on their use case, avoiding unnecessary errors and improving clarity in environments where both tools are used.

Let me know if this proposal makes sense to the team or if there are existing plans to address this inconsistency.

Thanks!

generated by Qwen

Use case

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issue, but not time-criticalcoreIssues that should be addressed in Ray CoreenhancementRequest for new feature and/or capabilitygood-first-issueGreat starter issue for someone just starting to contribute to Rayusability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions