This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
向互联网号码分配机构 (IANA) 注册的 HTTP 的官方分配是:
以下端口是也使用的非官方端口(未向 IANA 注册):
我不知道您的目标机器类型但如果它们包括开发机器,我可能会使用 8090 来尽量减少可能的冲突。
参考文献
The official assignments registred with the Internet Assigned Numbers Authority (IANA) for HTTP are:
The ports below are non official ports (not registered with IANA) that are also used:
I don't know what kind of machines you are targeting but if they include development machines, I would probably use 8090 to minimize possible conflicts.
References
最终,我们在注册端口范围内选择了一个任意未使用的端口(从 1024 到 49151),然后将其配置为可配置,以防有人出现并将该端口用于其他用途。最好的解决方案是注册该端口。
我们选择不使用动态端口,因为进程可以任意开始使用它们,因此端口是否可用的一致性会较差。
Ultimately we chose an arbitrary unused port in the Registered Port range - from 1024 through 49151 - and then made it configurable on the offchance someone comes along and uses that port for something else. Best solution would then be to register that port.
We chose not to use a dynamic port as processes are able to arbitrarily start using them, so it'd be less consistent whether the port was available.
如果您的服务是 HTTP,那么您应该使用端口 80 - 标准 HTTP 端口。这是大多数 REST Web 服务的典型特征。
If your service is HTTP then you should use port 80 - the standard HTTP port. This is typical of most REST webservices.