在Kubernetes中精心安排的Docker容器中的缓存服务器 [英] Caching server in Docker container orchestrated in Kubernetes

查看:172
本文介绍了在Kubernetes中精心安排的Docker容器中的缓存服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在docker容器中实现缓存服务器,整个集群由kubernetes进行编排.

I want to implement caching server in a docker container and the whole cluster is orchestrated by kubernetes.

下面是带有数据流的图.

Below is the diagram with the data flow.

此设置是否符合最佳做法? 如果没有,请提出最佳方法.

Is this setup according to the best practices ? If not then please suggest the best way.

谢谢.

推荐答案

我建议:

  1. 在MongoDB上使用Kubernetes运算符或StatefulSet,而不是独立的MongoDB pod.将MongoDB放在没有任何持久性和持久性的Pod中是极其危险的.副本实例.您可以在此处找到

在不同的Pod中使用单独的缓存服务器,或者对应用程序进行主从复制部署. 操作员可以帮助您简化这一过程.

Use a separate cache-server in different pods or deployment with master-slave replication for your application. Operators might help you simplify this.

将负载均衡器与入口控制器连接.我们不会将数据库Pod视为应用程序Pod(除非它们通过外部存储服务彼此共享数据),因为它们包含数据并且Service LoadBalancer可以将请求转发到部署对象中的任何Pod.

Attach the Load Balancer with the Ingress Controller. We don't treat database pods as applications pods (unless they shared data with each other via external storage service) since they contains data and Service LoadBalancer can forward request to any pod in the deployment object.

这取决于需求和要求.

这篇关于在Kubernetes中精心安排的Docker容器中的缓存服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆