dcos - marathon -lb 问题
2016-11-24 20:35
162 查看
marathon-lb的稳定性问题
假设在内部, 程序A去调用程序B使用api api-b,一共三个节点,通过域名api-b.marathon.mesos, 解析出来的A记录有三个,当然,解析出来的都是lb的地址,如果lb有一个挂了会有啥结果。短时间内是不是会造成502.marathon-lb居然也有保留端口
marathon-lb居然还保留了端口。By default, port 10000 through to 10100 are reserved for marathon-lb servicesmarathon-lb的virtual host
知道marathon-lb有强大的端口转发能力,没想到,居然也有http和https的virtual host功能哦。 An important feature of marathon-lb is support for virtual hosts。AWS为例,创建两个LB,检车是marathon-lb宿主机,端口9090,path /_haproxy_health_check.
externalnginx配置如下
{ "id": "nginx-external", "container": { "type": "DOCKER", "docker": { "image": "nginx:1.7.7", "network": "BRIDGE", "portMappings": [ { "hostPort": 0, "containerPort": 80, "servicePort": 10000 } ], "forcePullImage":true } }, "instances": 1, "cpus": 0.1, "mem": 65, "healthChecks": [{ "protocol": "HTTP", "path": "/", "portIndex": 0, "timeoutSeconds": 10, "gracePeriodSeconds": 10, "intervalSeconds": 2, "maxConsecutiveFailures": 10 }], "labels":{ "HAPROXY_GROUP":"external", "HAPROXY_0_VHOST":"brenden-j-PublicSl-1LTLKZEH6B2G6-1145355943.us-west-2.elb.amazonaws.com(这个地址是AWS LB的地址)" } }
参考:
https://mesosphere.com/blog/2015/12/04/dcos-marathon-lb/
如何更快地做出反应
使用 Marathon Event Busmarathon-lb里面的参数还可以修改
可以,使用template-url{ "marathon-lb":{ "template-url":"https://downloads.mesosphere.com/marathon/marathon-lb/templates.tgz" } }
重新运行
dcos package install --options=options.json marathon-lb
marathon-lab支持 ssl
"labels":{ "HAPROXY_0_VHOST":"nginx.mesosphere.com", "HAPROXY_0_SSL_CERT":"/etc/ssl/certs/nginx.mesosphere.com" }
自动扩容
牛来个叉marathon-lb-autoscale
参考:
https://mesosphere.com/blog/2015/12/13/service-discovery-and-load-balancing-with-dcos-and-marathon-lb-part-2/
扩展下
AWS ELB是几层负载
http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.htmlElastic Load Balancing supports the following protocols:
HTTP
HTTPS (secure HTTP)
TCP
SSL (secure TCP)
Load balancers can listen on the following ports:
[EC2-VPC] 1-65535
[EC2-Classic] 25, 80, 443, 465, 587, 1024-65535
相关文章推荐
- 用DCOS和marathon-lb实现服务发现和负载均衡:第一部分
- mesos-dns & marathon-lb
- Rational 2002产品的安装问题释疑 选择自 lb_zhao 的 Blog
- 解决marathon上docker实例一直waitting的问题
- lb route 相关的一些问题
- marathon-lb-什么是服务发现?(转)
- marathon-lb使用实践
- Marathon自动扩缩容(marathon-lb-autoscale)
- IBM SAN_B24交换机开不了机问题 zhoulb@dc
- 用DCOS和marathon-lb实现服务发现和负载均衡:第二部分
- marathon-lb的高可用性
- Mesos+Zookeeper+Marathon的Docker管理平台部署记录(2)--负载均衡marathon-lb
- dcos - marathon - 有的时候健康检查不是绿条
- 【云计算】Kubernetes、Marathon等框架需要解决什么样的问题?
- DCOS之MarathonSSL与基本认证篇
- Marathon-lb 服务自动发现和负载均衡
- marathon异常挂掉问题记录
- DCOS之Marathon安装指引篇
- dcos里面跑jenkins的问题
- 六、DC/OS 运行 marathon-lb