Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

solution for docker swarm

imgmoneyimgmoney Member
edited March 2023 in Help

Hi All,

I am learning docker swarm to make the stack deployment easier. And I am looking for a solution or ideas for the below problems.

1) persistent storage

I want a volume available for all the containers in all nodes in the swarm.

Use case:

to store MySQL data
to sore static files and session

I see people using GFS and making the volume available in all nodes. But I want something to be deployed as Docker Swarm service via compose file instead of manual setups.

2) sync files across the container

I want to sync folders and files from one container to all the containers. I can use lsyncd, but as I will scale the services, I like the host details to be dynamic.

Note: I will use this thread to reply to any new problem as I am learning. I am not going to use this thread as support. As I will do all extensive research and only if I find there is no idea, I will look for ideas from LET members

Thanks

Thanked by 1Calin

Comments

  • fartfart Member

    Common NFS mount on all servers and then mount said NFS mount as a volume in each container?

    If you're open to using K8s, persistent volumes are an option.

  • I set up a three-node Docker Swarm cluster around 1.5 years ago. For storage, it was GlusterFS. Everything worked perfectly until I decommissioned the environment a month ago.

    Usage was low. It was around ten docker services and a small DB for an SMB.

    Then it was Nginx on all nodes with rolling DNS failover if a node failed.

    I suggest using Portainer once it's set up. It's a great UI to use and saves a lot of time. But unfortunately, I only used it around two months ago before realising the system design needed changing.

  • imgmoneyimgmoney Member
    edited March 2023

    @supriyo_biswas said:
    Common NFS mount on all servers and then mount said NFS mount as a volume in each container?

    If you're open to using K8s, persistent volumes are an option.

    I am learning K8s in the meantime.

    @MrLime said: GlusterFS

    My app requires more IOPS. I see many differences when the app is deployed in NVMe and SSD.

    Won't GlusterFS degrade the performance?

    Example: storing MariaDB data into glusterFS volume and PHP codes into GlusterFS volume.

  • @imgmoney said:

    @supriyo_biswas said:
    Common NFS mount on all servers and then mount said NFS mount as a volume in each container?

    If you're open to using K8s, persistent volumes are an option.

    I am learning K8s in the meantime.

    @MrLime said: GlusterFS

    My app requires more IOPS. I see many differences when the app is deployed in NVMe and SSD.

    Won't GlusterFS degrade the performance?

    Example: storing MariaDB data into glusterFS volume and PHP codes into GlusterFS volume.

    Your next alternative is to outsource the DB outside of Docker perhaps, maybe a Galera master-master cluster. I've set that up before but it would have been overkill for my use case.

    I would suggest trialing the different options and testing things before committing to something.

  • @imgmoney said: 1) persistent storage

    I have found that SeaweedFS is the best solution for persistent storage in Docker Swarm. https://github.com/seaweedfs/seaweedfs/wiki/SeaweedFS-in-Docker-Swarm

    Thanked by 1imgmoney
  • vsys_hostvsys_host Member, Patron Provider

    You don't need to store MySQL data on several nodes at the same time. The right way is to build a MySQL cluster (Percona) where each node will have its own storage.

  • @fart said: If you're open to using K8s

    I am started using K8s now. But still, I find shared storage issues over here. I tested longhorn, which is simple to use. But it has poor IOPS.

    Example:

    Longhorn - 1300IOPS
    Local Path - 40K IOPS

    Due to this, my app performs 3 times slower. Any self hosted solution which have integration with K8s?

Sign In or Register to comment.