Mechanism of selecting gateway for downlink data of NS server

For loranwan communication,The node sends a signal,multiple gateways will receive this message and pass it to ns,However, the downlink signal to this node will only be transmitted through one gateway,What is the mechanism for ns to select gateway.We can get the signal strength information related to the gateway from mqtt. I understand that we can calculate the best gateway according to this information. However, I don’t know what the calculation method of NS server is.

This had been answered previously, it chooses the gateway with the strongest receive signal to send with.

I know it will choose the gateway with the strongest signal, but what is the basis for the strongest signal? Can I get it according to the uplink data.My purpose is to know which gateway ns will choose before sending data, so that we can control the load of each gateway
For example, I got the uplink data of the node:

{
  "applicationID": "1",
  "applicationName": "Bamboo_app_server",
  "deviceName": "210700000004",
  "devEUI": "AAAAMQ6y2wQ=",
  "rxInfo": [
    {
      "gatewayID": "qlAAAJAwAAE=",
      "time": null,
      "timeSinceGPSEpoch": null,
      "rssi": -93,
      "loRaSNR": 6.5,
      "channel": 1,
      "rfChain": 0,
      "board": 0,
      "antenna": 0,
      "location": {
        "latitude": 0,
        "longitude": 0,
        "altitude": 0,
        "source": "UNKNOWN",
        "accuracy": 0
      },
      "fineTimestampType": "NONE",
      "context": "Jkpbag==",
      "uplinkID": "HCmKYoZVRxy4DYqdqpnsMw==",
      "crcStatus": "CRC_OK"
    }
  ],
  "txInfo": {
    "frequency": 915400000,
    "modulation": "LORA",
    "loRaModulationInfo": {
      "bandwidth": 125,
      "spreadingFactor": 7,
      "codeRate": "4/5",
      "polarizationInversion": false
    }
  },
  "adr": true,
  "dr": 5,
  "fCnt": 38,
  "fPort": 20,
  "data": "Pp6PAAEAAQBmAYQPAAAj8QACAwkQS0ZNMzIxMDcwMDAwMDAwNAkGAQBjAQD/AQQCDgkMB+YCEAMNDwAAgAAAEQcVAAAAAAAAAAAVAAAAAAAAAAAVAAAAAAAAAAAVAAAAAAAAAAASEcsSAAASAAAGAAAAAAYAAAAABgAAAAAGAAAAAAYAAAAAAg4JDAfmAhADDR4AAIAAABEHFQAAAAAAAAAAFQAAAAAAAAAAFQAAAAAAAAAAFQAAAAAAAAAAEhHGEgAAEgAABgAAAAAGAAAAAAYAAAAABgAAAAAGAAAAAAIOCQwH5gIQAw0tAACAAAARhw==",
  "objectJSON": "",
  "tags": {},
  "confirmedUplink": false,
  "devAddr": "AeXsKw==",
  "publishedAt": "2022-02-16T06:29:24.157614898Z",
  "deviceProfileID": "30046bf8-3e13-4d84-b0b5-89e1e0132810",
  "deviceProfileName": "elec-meter"
}

I know that the signal strength of the gateway can be judged according to these two parameters:“loRaSNR” and “rssi”,but I need to know how ns is calculated based on these values. I want to make sure that our calculation method is consistent with that of NS

I believe it’s RSSI, but you can check the code.

How frequently and in what device density are you operating that you need to rate-limit your downlinks like this?