With Cloud Relay and the /rest/v1/licenses API endpoint, how does the relay determine which server the licenses is bound to?

Answered

Comments

5 comments

  • Avatar
    Andrey Terentyev

    Hi,

    how the relay selects which server it will use for licenses.

    Relay does not select, it just forwards requests to a Server in the system.

    How can I determine which server will be used?

    The licenseBlock stores HWID, which can be searched in what the /ec2/getHardwareIdsOfServers returns.

    0
    Comment actions Permalink
  • Avatar
    Luke McFadden

     it just forwards requests to a Server in the system.

    So in a 5 server system, how is it deciding?  Randomly?  Or in some order?  The request without a licenseBlock is still binding to a hardwareId.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    hi,

    Here is what I figured out, but have not tested.

    If you want to send an API call to a certain server you should add a special header to your HTTP request:

    X-server-guid: <server_id>
    0
    Comment actions Permalink
  • Avatar
    Luke McFadden

    Thanks Andrey Terentyev

    In testing, this is working.  It returns a 503 if the server is offline it seems.  

    Related, is there currently any /cdb/ endpoint that will return the server ID's for a system?  I know I can use the relay call to /rest/v1/servers, but curious if I could pull server ID's from the cloud.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi,

    Related, is there currently any /cdb/ endpoint that will return the server ID's for a system?

    No, there is none of it.

    0
    Comment actions Permalink

Please sign in to leave a comment.