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

2016/10/build-a-anycast-network-gce/ #32

Open
ZE3kr opened this issue Nov 28, 2021 · 37 comments
Open

2016/10/build-a-anycast-network-gce/ #32

ZE3kr opened this issue Nov 28, 2021 · 37 comments

Comments

@ZE3kr
Copy link
Owner

ZE3kr commented Nov 28, 2021

Written on 10/04/2016 01:27:00

URL: https://guozeyu.com/2016/10/build-a-anycast-network-gce/

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by yearliny on 10/15/2016 15:16:04

你的文章截断功能是用什么方法实现的?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 10/16/2016 00:16:25

你是说分割线?在 WordPress 官方界面编辑文章时,是支持部分的 Markdown 语法的,比如分割线在可视化编辑器里可以在新的一行里用 ---,然后换行就行了,或者用文本编辑模式输入 HR 标签

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by yearliny on 10/16/2016 01:33:17

你都是手动添加分割线的啊~可以看出来你写文章时很用心

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by jack on 10/20/2016 08:38:03

文章内容页面的目录是如何做的?我也想用

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by L7 on 11/04/2016 22:54:42

总算找到gce cdn的设置文章了,试过一阵,发现单独一个转发规则都要收费,价格超过实例费用,最后放弃了。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 11/04/2016 23:21:44

是的,这个价格是很高的,每月下来得 20 刀以上,不建议个人使用,我只是测试了一下而已。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by L7 on 11/04/2016 23:30:19

回复这么快:)

早上好,祝周末愉快哈!

以后常来你这学习。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by BabyBichu on 11/20/2016 13:33:45

Anycast支持HTTPS吗?
Anycast不需要收费吧?
表示看着有点懵哈哈~
感觉配置一个美国一个亚洲一个月下来10几美元左右?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 11/25/2016 07:53:20

Anycast有每小时的额外消费,这个额外消费就高达十几美元每月。

支持HTTPS,需要额外上传证书到Anycast系统。

建议还是使用 GeoDNS 的方式,Anycast 需要预算充足。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by BabyBichu on 11/25/2016 08:11:46

自建dns很棒哈哈
不过我买gce就俩用处:翻墙、放自建评论系统,我中文和英文博客都是静态,中文放在又拍云,英文放在KeyCDN上,中文评论系统现在用的cloudxns那个加速,至少能保证各地ping通吧。不知道等我买了gce台湾节点后对评论数据用CloudFlare的CDN是加速还是减速?至少英文评论数据使用那个后反而在中国减速了,动态数据不适宜CDN惹。
GCE没有像Linode限制信用卡吧?打算放假办建行信用卡然后买GCE台湾节点。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by Angering Boy on 06/05/2017 11:20:12

Quote:"中国的速度那更是一流的快,Google 有香港的边缘节点,所以基本上是直接走的香港节点,比原本的连接台湾可用区快不少。(只有部分 IP 段是完全直连的)"

你这句话放在你启用CDN之前,所以我的理解是...你开启CDN之前国内就可以直接访问到香港的(CDN)节点?因为GCE好像没有香港区吧...。只是理解起来有点困难= =
另外,您当时用的DNS是Google的cloud DNS吗?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 06/10/2017 05:37:45

这句话是指启用了 Google Cloud CDN 之后的效果,Google Cloud 有香港节点,可参见:Cloud Locations 或者 https://cloud.google.com/cd... 。无论是否启用了 CDN 功能,只要开启了 Load Balancing 功能,就会使用香港节点,所以 Ping 值是不受影响的,如果开启了 CDN,那么内容还会被 CDN 节点缓存,速度就更快了。当时使用的是 Google Cloud DNS。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 神奇 on 06/13/2017 15:13:07

請問 Anycast 只幫忙分配主機,不同主機上的數據同步需要自行處理?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by Xiao Ke on 06/14/2017 07:07:38

你好,请问怎么原生支持IPV6

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by SAMLIN on 06/14/2017 10:38:29

想咨询一下文中没有细说的ipv6原生支持,作者会有后续文章吗?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 06/16/2017 09:02:18

详情内容请参考:https://cloud.google.com/co...

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 06/16/2017 09:02:36

详情内容请参考:https://cloud.google.com/co...

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 06/16/2017 09:11:42

是的,Anycast 只是一种基于 HTTP(S) 协议 Load Balancing 机制而已。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by Yisama on 09/02/2017 05:41:10

博主你好,谢谢你的详细教程,我们公司海外站的速度终于脱胎换骨了,请添加打赏功能,我有发红包的冲动,最后有3个问题稍微请教下,
1、我发现load balance后端就添加了一个组,也能用也能跑,国球ping的结果也挺好,那是不是别的区的像欧洲、美国的,可以删除实例了?
2、如果我不删除美国和欧洲的区,假设我的客户在欧洲,load balance会指向欧洲的组吗?
3、像我这种公司站,一天几十个IP,把CDN开开是不是更好?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by Yisama on 09/02/2017 07:35:28

我绑定了3个区,不同国家的,然后用SS(美国的)访问,看log,还是只走的台湾,load balance好像不指向其他区。然后其他两个区下载果然还是慢的,不知道哪里没设置对。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 09/02/2017 10:52:15

感谢对本站的支持。1. LB的后端只有一个服务器的话,的确可以使用,但就没有LB的意义了,Ping值低并不就意味着延迟低,GCP的网络无论是否使用LB,都是很稳定的Premium Tier。

2. LB就是会根据访客的位置来将流量引导向最近的服务器的。不过如果Health Check认为服务器不可用,就会指向其他可用的服务器,所以要逐一检查每个服务器是否端口、防火墙和服务都配置正确才行。

3. CDN功能没有什么坏处,它会降低静态文件的加载延迟,也没有什么额外的开销,但要确保服务端有配置了正确的Cache Control,以免不该被缓存的缓存了,会泄露敏感数据。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by Yisama on 09/02/2017 12:59:02

点头,鼓掌,撒花,求二维码,发红包

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 黎明 on 09/25/2017 02:12:14

那个健康检查是不是必须要1/1才可以呢?因为我按照您这个教程去做了,但是最后解析的时候发现报错502...........

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 李昆明 on 10/12/2017 11:00:57

请问负载均衡的前端服务器,好像只能支持80和8080端口,如果服务是其他端口,怎么实现做负载均衡呢,谢谢啦!

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 10/13/2017 14:33:27

不支持特定端口的。TCP/UDP负载均衡支持的端口应该多一些

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by edison on 12/09/2017 07:51:45

感谢,很有帮助,话说我朋友也叫郭泽宇。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 小鬼No1 on 12/20/2017 02:35:21

请问ping测试跟连接测试用的是哪个网站的?

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 12/23/2017 15:54:41

墙外网站 https://tools.keycdn.com/

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 小鬼No1 on 12/28/2017 01:52:29

太感谢了,帮助很大。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 种子搜 on 03/28/2018 01:12:18

虽然速度很好,但是GCE价格太高了,个人用户承受不了。

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by BINARIZATION on 08/27/2018 13:04:08

也只有 CloudFlare 和 Google 能推出全球范围的云 Anycast IP ,我至今没见过其他云厂商能提供这么亲民的服务

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by 胡瀚 on 08/29/2018 01:44:29

腾讯云也是有的哈

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by lao on 10/25/2018 09:26:40

腾讯云有个

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by lao on 10/25/2018 09:27:57

腾讯云有个

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by BINARIZATION on 10/25/2018 10:02:30

你们都是腾讯云请来的救兵吗?商业内测耶,价格贵死了

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by Eric on 11/11/2018 13:49:04

大神,请问一个问题

我买了个GCP的计算引擎虚拟机,里面总有4个Google 的Python脚本长期占用很高的CPU资源。

我尝试加了个vCPU(加了之后是两个vCPU) 重启还是这样。

这正常吗?网上搜索不到相关资料

图片如下
https://i.stack.imgur.com/D...

@ZE3kr
Copy link
Owner Author

ZE3kr commented Nov 28, 2021

Comment written by ZE3kr on 11/11/2018 14:16:17

不应该长期占用很高的 CPU。我记得 Google Cloud 操作系统中内置的 gcloud 等工具是拿 Python 写的,可能是内置软件的 Bug 导致的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant