Development process of distributed architecture

Load balancing algorithm

  1. Polling
  2. Weighted polling
  3. Random algorithm
  4. Minimum number of connections
  5. hash calculates the hash value according to the client ip, and hash%2 is modulated to determine the distribution target

Database evolution

1. Database performance improvement
  • How to synchronize the database
  • How to route the data source
  • < /ul>

    1.1 Option 1: Introduce a search engine:

    • Improve retrieval speed
    • Reduce the pressure of reading the database
    • lucence, solr, elk
    • Index construction:
      Build an index based on raw data
      Full build -> First build
      Incremental build -> Incremental synchronization
      Non-real-time (asynchronous/timed task), real-time

    1.2 Option 2: Caching

    • Caching: In order to reduce low-speed devices And the difference between high-speed equipment.
    • Nosql storage or other storage methods
      Nosql: hbase, mongoDB, Redis…
      Other caches: browser cache, application cache, db cache, cpu cache, file storage, etc

    2. Distributed database
    2.1 What is the role of transaction?
    2.2 Distributed Database:

    Realize database splitting by sub-database and table:
    According to service characteristics (business volume, type etc. ) Configure database performance separately


    Application evolution

    Problems of traditional single application:

    1. Deployment and Maintenance difficulties
    2. Business coupling is very high
    3. Performance bottlenecks
    4. Test

      1. The application is split according to functional modules:
      1.1 such as: member service, transaction service, commodity service

    The role of RPC in distributed?

    1.2 Service segmentation

    Advantages:

    • Special personnel to maintain special services

      li>

    • According to different throughput requirements, make targeted expansions

    Disadvantages:

    • Operation and maintenance costs Increase
    • Increased team members

    High Availability Plan

    1 . Single point of failure

    1.1 Multi-room deployment


    monitoring

    1. Link monitoring

    • zipkin
    • traceID

    2. Hardware monitoring
    cpu, internal memory, disk


    architecture development process

    1. SOA-ESB< /p>

    • Client 1, Client 2….
    • ESB:
      Communication and discovery of services
      Protocol conversion
      Security
      Limits Flow
    • Server cluster

    2. Microservices
    Registration center: eureka, zookeeper, consoul

    3. Container + k8s scheduling

    4. serviceMesh (service mesh) The sidecar solves: service fusing, invocation, discovery, load balancing< /p>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2885 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.