GithubHelp home page GithubHelp logo

suxiaosong12 / chatserver Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.53 MB

可以工作在nginx tcp负载均衡环境中的集群聊天服务器和客户端源码 基于muduo实现

C++ 99.78% CMake 0.21% Shell 0.01%

chatserver's Introduction

chatserver

项目描述

一个基于muduo网络库的聊天服务器+聊天客户端项目,服务器端使用了redis缓存集群和Nginx/Tcp集群方案。其中,nginx负责处理客户端的请求,通过nginx的负载均衡策略,nginx会筛选出压力最小的服务器,用于处理客户端的请求信息。信息到达服务器后,再进入作为缓存队列的redis中,然后通过发布-订阅模式,转发到客户端正在进行通信的另一方客户端。客户端用户注册的账号信息会保存到MySQL数据库中。

项目依赖

平台工具:VScode远程连接Ubuntu20.04开发。
muduo网络库
数据库:mysql Ver 8.0.33-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
缓存服务器:redis version:5.0.7
反向代理服务器:nginx version:1.18.0

业务流程

image

chatserver's People

Contributors

suxiaosong12 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.