All Projects → senssei → Mongo Cluster Docker

senssei / Mongo Cluster Docker

Licence: mit
Docker compose config for mongodb cluster

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Mongo Cluster Docker

Go Clean Architecture
👨‍💻 REST API example, built by following Uncle Bob’s clean architecture principles
Stars: ✭ 133 (-19.39%)
Mutual labels:  mongo, mongodb, docker-compose
Intro Mongo Db
[Course] Introduction to MongoDB code
Stars: ✭ 114 (-30.91%)
Mutual labels:  mongo, mongodb
User.api
集成网关、身份认证、Token授权、微服务、.netcore等的基于CQRS的微服务开发框架示例
Stars: ✭ 109 (-33.94%)
Mutual labels:  mongodb, docker-compose
Docker Compose
一些基础服务的docker-compose配置文件,方便在一台新电脑上快速开始工作
Stars: ✭ 163 (-1.21%)
Mutual labels:  mongodb, docker-compose
Mongoose Fuzzy Searching
Mongoose Fuzzy Searching Plugin
Stars: ✭ 94 (-43.03%)
Mutual labels:  mongo, mongodb
Node Typescript Mongodb
node js typescript mongodb express generator yo
Stars: ✭ 96 (-41.82%)
Mutual labels:  mongo, mongodb
Wekan Mongodb
Docker: Wekan <=> MongoDB
Stars: ✭ 130 (-21.21%)
Mutual labels:  mongodb, docker-compose
Avocado
Strongly-typed MongoDB driver for Rust
Stars: ✭ 70 (-57.58%)
Mutual labels:  mongo, mongodb
Hashbrown Cms
A free and open-source headless CMS
Stars: ✭ 140 (-15.15%)
Mutual labels:  mongo, mongodb
Nest User Auth
A starter build for a back end which implements managing users with MongoDB, Mongoose, NestJS, Passport-JWT, and GraphQL.
Stars: ✭ 145 (-12.12%)
Mutual labels:  mongo, mongodb
Nodejs Backend Architecture Typescript
Node.js Backend Architecture Typescript - Learn to build a backend server for Blogging platform like Medium, FreeCodeCamp, MindOrks, AfterAcademy - Learn to write unit and integration tests - Learn to use Docker image - Open-Source Project By AfterAcademy
Stars: ✭ 1,292 (+683.03%)
Mutual labels:  mongodb, docker-compose
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-7.27%)
Mutual labels:  mongodb, docker-compose
Fullstack Shopping Cart
MERN stack shopping cart, written in TypeScript
Stars: ✭ 82 (-50.3%)
Mutual labels:  mongodb, docker-compose
Mean Stack Angular5 Crud
MEAN Stack (Angular 5) CRUD Web Application Example
Stars: ✭ 107 (-35.15%)
Mutual labels:  mongo, mongodb
Lua Mongo
MongoDB Driver for Lua
Stars: ✭ 81 (-50.91%)
Mutual labels:  mongo, mongodb
Variety
A schema analyzer for MongoDB
Stars: ✭ 1,592 (+864.85%)
Mutual labels:  mongo, mongodb
Mern Stack Authentication
Secure MERN Stack CRUD Web Application using Passport.js Authentication
Stars: ✭ 60 (-63.64%)
Mutual labels:  mongo, mongodb
Mean Stack Angular6 Crud Example
MEAN Stack Angular 6 CRUD Web Application
Stars: ✭ 69 (-58.18%)
Mutual labels:  mongo, mongodb
Almost Famous
🌟 Almost-Famous(成名之路) ——卡牌游戏开源项目,架构使用SpringBoot+Netty+Maven+SpringCloud来搭建多进程分布式框架,包括Cloud、Unique、Login、Game、Match、Battle 等服务。
Stars: ✭ 131 (-20.61%)
Mutual labels:  mongodb, docker-compose
Appkernel
API development made easy: a smart Python 3 API framework
Stars: ✭ 152 (-7.88%)
Mutual labels:  mongo, mongodb

mongo-cluster-docker

This is a simple 3 node replica mongodb setup based on official mongo docker image using docker-compose described in my blogpost at https://warzycha.pl/mongo-db-sharding-docker-example/.

For details description, steps and discussion go to:

  1. https://warzycha.pl/mongo-db-sharding-docker-example/
  2. https://warzycha.pl/mongo-db-shards-by-location/

Run

docker-compose -f docker-compose.1.yml -f docker-compose.2.yml  -f docker-compose.cnf.yml -f docker-compose.shard.yml up

Tests

Manually for the time being

  1. Core tests

Basic replica test on rs1 replica set (data nodes), mongo-1-1

rs.status();

this should return in members 3 nodes.

Basic sharding test on router (mongos), mongo-router

sh.status();

this should return something similar to:

--- Sharding Status --- 
  sharding version: {
	"_id" : 1,
	"minCompatibleVersion" : 5,
	"currentVersion" : 6,
	"clusterId" : ObjectId("587d306454828b89adaca524")
}
  shards:
  active mongoses:
	"3.4.1" : 1
  balancer:
	Currently enabled:  yes
	Currently running:  yes
		Balancer lock taken at Mon Jan 16 2017 22:18:53 GMT+0100 by ConfigServer:Balancer
	Failed balancer rounds in last 5 attempts:  0
	Migration Results for the last 24 hours: 
		No recent migrations
  databases:

Sharding configuration

Connect to 'mongos' router and run queries/shard-status.js for shard status.

To establish location based partitioning on it just run queries/init.js.

Issues and limitations

It's sometimes stuck on 'mongo-router | 2017-01-16T21:29:48.573+0000 W NETWORK [replSetDistLockPinger] No primary detected for set cnf-serv'. It's because quite random order in docker-compose.

My workaround was just to kill all containers related.

docker-compose -f docker-compose.1.yml -f docker-compose.2.yml  -f docker-compose.cnf.yml -f docker-compose.shard.yml rm -f

Please pull request. :)

Basically mongosetup service is now splitted to multiple yml files. :)

Reference

See more @ ENV.md

MIT @ LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].