Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postman + Charles 检查后端服务迁移结果 #136

Closed
Dream4ever opened this issue Jan 26, 2021 · 0 comments
Closed

Postman + Charles 检查后端服务迁移结果 #136

Dream4ever opened this issue Jan 26, 2021 · 0 comments
Labels
Back-end Where data really come and go Server The invisible hero

Comments

@Dream4ever
Copy link
Owner

Dream4ever commented Jan 26, 2021

整体流程

需求:需要将后端服务从服务器 A 迁移到服务器 B 上,同时后端服务的外网域名 1 不变。

当前环境:域名 1 解析至服务器 A 的 IP,域名 2 解析至服务器 B 的 IP。

原来的后端服务运行在域名 1 的 v1 目录下。

在域名 2 对应的服务器 B 上安装配置同样的后端服务。

然后用 Postman 请求两个域名下的各个接口,把响应结果保存为文件,用 Beyond Compare 对比文件内容,完全相同,说明运行在服务器 B 上的后端服务也是 OK 的。

再用 Charles 配置 Rewrite 规则,对于指向原来的后端服务所在域名 1 的请求,全部重写至新的后端服务所在域名 2 的请求,然后浏览前端页面,测试各项功能,也一切正常。

最后将域名 1 解析至服务器 B 的 IP,后端服务迁移完成。

@Dream4ever Dream4ever added Back-end Where data really come and go Server The invisible hero labels Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end Where data really come and go Server The invisible hero
Projects
None yet
Development

No branches or pull requests

1 participant