Architecture sharing-Weibo architecture Review

Source: Internet
Author: User

Recently, my work has changed a little bit. I was idle in May and I was always thinking about my next direction. I also summarized my study over the past year.

The in-depth architecture is the most important accumulation in the past year. From small companies to large companies, from the architecture design of small-traffic sites to the architecture design of large-traffic or even ultra-large-traffic, it is recorded, share it.

Before sharing your notes, let's first share Tim Yang's Weibo Architecture Design:

In terms of storage and interfaces

For the architecture design of a large-volume system, we need to pay special attention to writing. Basically, the system we encounter is writing data to the primary database, and then distributing traffic from the database.

For storage, I remember the company's boss said that if the architecture of the BD project can reach 20 Pb in size from the design, it means that the architecture design is qualified.

For storage, Sina Weibo uses some redis functions and is mainly used in user information. Currently, it is only designed as a single machine. However, a single machine can provide a large amount of memory, such as 32 GB or more, it can fully meet the requirements for data storage.

What MySQL involves here is the design specification and database/table sharding. The biggest feeling is that you can directly use the auto-increment ID for convenience, I have always paid attention to the design of the unique ID, because the unique design involves the global.

I will summarize my recent PHP and Weibo architectures:

1. In the process of rapid development, it is very important to set standards and implement them in accordance with the standards. There will be less communication involved. In fact, it is very time-consuming to work with other people.

2. xhprof can be used to track PHP Execution Process and performance problems in performance tracking, which can be preliminarily estimated.

3. for CoreCodeThe degree of reuse and the grasp of the core code volume, the core should be flexible, scalable and kept small

4. Technical Selection for example, memcache extension and memcached extension are very important.

5. It is very important for the directory structure and name of the Code. It is better not to search too many directories for PHP autoload.

6. Considering the reuse of tool classes, we have been re-writing the wheel every time. This is not a very depressing thing. How can we prevent these classes from being too tightly coupled? Design is important

7. Some services are not suitable for PHP. For example, it is better to use the C/C ++ module to filter high-risk words in the spam module.

8. Weibo technology application inbox/outbox/timeline/following/follows/feed/mqs

9. RecommendedAlgorithmAnd message push processing, various high-concurrency Processing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.