跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[Go 编程语言] 大家线上的 Go 服务都是如何部署的?

发表于

RT, Go 服务如何部署到线上环境,包括如何发布、回滚。

我先说说我知道的

前提:会对 go 应用进行打 tag

方案一:

1 、把 go 应用要上线的 release tag 打包成 docker 镜像 2 、然后在 k8s 进行部署, 回滚的话直接回滚到上一个 tag 3 、域名直接解析到 k8s 的 ingress 解析到对应的 service 中,服务也可以 HPA 动态扩容

方案二:

1 、直接把 go 的二进制文件+配置文件 放到对应的线上的机器上,如果是多台就部署到多台服务器 2 、前面加一层 nginx ,然后通过 proxy_pass + upstream 解析到对应的 go 服务器上 3 、域名直接解析到 nginx 即可。

想知道除了这两种方式,还有什么方式?

相比而言,你认为哪种方式更好?

欢迎大家畅所欲言

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.