Giter Club home page Giter Club logo

dha-spring-boot's Introduction

  • 主从数据同步延迟问题:

    因为数据是从master节点通过网络同步给多个standby节点,因此必然存在延迟。

    因此有可能出现我们在master节点中已经插入了数据,但是从standby节点却读取不到的问题。

    对于一些强一致性的业务场景,要求插入后必须能读取到,因此对于这种情况,我们需要提供一种方式,让读请求也可以走主库,而主库上的数据必然是最新的。

    简单的解决方案是能够容忍一定程度(例如10s)的数据不一致,每10s强制同步数据。

  • 事务问题:

    如果一个事务中同时包含了读请求(如select)和写请求(如insert),如果读请求走从库,写请求走主库,

    由于跨了多个库,那么本地事务已经无法控制,属于分布式事务的范畴。而分布式事务非常复杂且效率较低。

    因此对于读写分离,目前主流的做法是,事务中的所有sql统一都走主库,由于只涉及到一个库,本地事务就可以搞定。

  • 感知集群信息变更:

    如果访问的数据库集群信息变更了,例如主从切换了,写流量就要到新的主库上;又例如增加了从库数量,流量需要可以打到新的从库上;

    又或者某个从库延迟或者失败率比较高,应该将这个从库进行隔离,读流量尽量打到正常的从库上

先编译 dha-spring-boot-starter 模块,如果报错找不到 dha-spring-boot,就先去掉parent,再编译;

然后编译 dha-spring-boot-autoconfigure,如果报错同上处理,最后编译 root 即可

dha-spring-boot's People

Contributors

yinxunjiu avatar

Watchers

James Cloos avatar Shi Haohong avatar sunrainchen avatar FinnCheong avatar  avatar 橙子 avatar 博勋 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.