• Email:
  • Feeds

  • 单元化与分布式架构的切分问题

    单元化是将一个系统的架构按某种数据特征维度进行垂直的划分,比如网站有100万用户,如按照用户维度进行划分,则可以分成10个单元,每个单元存储10万用户资料。单元化的一些收益如下

    • 由于每个单元数据规模可控,相关维度内的所有资料可放在一个数据库中(如上例中的用户资料),不需要复杂的sharding分库分表逻辑,存储及缓存访问得到极大的简化。同时开发也变得简单,工程师不需要有丰富的“大规模大并发系统”开发经验。
    • 同时由于计算离存储更近,也可以让数据离用户更近,比如用户数据存储在地理上靠近用户的位置,数据有了更好的局部性(locality),因此也会获得更好的访问性能。部署上相关单元的前端、缓存、数据库、数据挖掘等节点可在同一个机柜,架构上让大数据的访问变得低廉,也在部分程度上让大数据更为快速及敏捷。
    • 可以自然支持不同用户分片支持不同的功能特性,天然的A/B testing试验场。

    分布式是将一个系统的数据分布到多个单元,以便使系统能够scale out,具有更好的可扩展性。当今大型网站基本上是分布式设计的。分布式系统除了机房内的,考虑到系统扩展性、用户访问的便捷性、机房规模的物理限制、异地容灾(比如2013年4月及8月的微信机房故障)等需要,大型系统也会考虑地理分布在多个机房。

    但是在社交网络中,由于数据的网状访问,单元化会碰到较难选择合适的单元化切分维度的问题,比如按用户或按内容进行单元化不能很好的适应数据访问局部性的问题,同时地理分布式也面临相似问题,由于社交网络中用户的页面需要访问的,所有地理分布的机房都同步需要全量数据,导致部署和维护成本较高。

    假定系统中存在一个跨单元的数据访问总线,并且总线的访问满足

    1. 局部性,单元内的访问,大部分的数据可以在单元内命中。
    2. 封装性,单元内的应用程序使用统一的方法访问数据,不需要关注数据的具体位置。

    那么这个数据总线应该如何设计?放在哪个层级比较合适?比如service layer, cache or storage(e.g. Google Spanner)?

    11 Comments  »

    1. arbow says:

      刚做完一个类似的项目,国外存放本地数据,国内存放全量数据,datachannel(数据访问总线)在DAO层,提供数据同步的接口代理以及MQ消息的传输

    2. It’s an awesome paragraph in favor of all the internet users; they will
      get advantage from it I am sure.

    3. ProBux says:

      It is in point of fact a nice and helpful piece of info.
      I’m glad that you simply shared this helpful information with us.
      Please stay us informed like this. Thanks for
      sharing.

    4. Larry: Well. More than anything,ANSI IT9.20-1996, I guess,ANSI Z80.26-1996, to be on the stage. The answer is that your list is Emily Ratajkowski. Your idea of what everyone “should” have is nothing more than a list of what most people on earth don’t have,ANSI C78.1351-1989, and have never had. My 7870 XT benchmarks over 2x as powerful as the ps4 pretty sad. I love consoles and all gaming,ANSI C136.20-1990, but people should know,ANSI C78.386-1989, the next gen systems are not giving you a lot o

    5. Wow! I’m really enjoying the design and style of your site.
      Are you using a custom theme or is this freely available to all individuals?
      If you don’t want to say the name of it out in the public, please e-mail me at:
      maynardstiltner@googlemail.com. I’d really enjoy to get my hands on this template!

      Many thanks.

    6. Chadwick says:

      Hi! This is kind of off topic but I need some
      help from an established blog. Is it hard to set up
      your own blog? I’m not very techincal but I can figure things out pretty quick.
      I’m thinking about making my own but I’m not sure where to begin. Do you have any tips or suggestions?
      Thank you

    7. A few mature display cases incorporate the actual interiors on the display case decorated a high shine white-colored for you to show as much gentle as it can be The info revealed to a 10 p . c profit the outstanding approach to relieve the hangover annoyance should be to frequently minimize alcohol consumption to enjoy per day this is to consume alcohol in all forms in any way It’s got ALL the required materials for one to achieveHandbags can be a females in close proximity friend and whenever y

    8. If you want to grow your knowledge simply keep visiting this web site and be updated with the latest news update posted
      here.

    9. Kandice says:

      Asking questions arе in fact nice thing iif уοu arе nnot understanding something totally, еxcept this paragraph ρresents fastidious understanding еven.

    RSS feed for comments on this post, TrackBack URI

    Leave a Comment