Design and development principles for Small-Scale Low-performance low-traffic websites

Source: Internet
Author: User
Tags mysql index

Design and development principles for Small-Scale Low-performance low-traffic websites

I often see articles on analysis of large-scale, high-traffic, and high-performance website architecture design on some technical sites. These articles basically satisfy people's curiosity, however, the actual benefits may not be significant after reading this article. This is because most people may not have many opportunities. Even if you come into contact with it, the actual situation is often different from the many articles you see.

In addition, this article seems to have a side effect, that is, it is easy to make people feel at ease. If they do not learn how to run first, many people will experience excessive design and extension when many conditions are not met, it is too early to consider unnecessary problems, and the results often result in counterproductive events.

Today, this article mainly discusses how to design and develop small-scale, low-performance, and low-traffic websites.

In the initial stage, the website may be a machine or a space (for example, a website with no more than 5000 daily IP addresses such as www.phpernote.com). At this time, let's focus on data splitting and load balancing, there is no shadow. The experience of many large websites cannot be copied. It is the best practice to treat problems dialectically based on the actual situation.

Embracing well-known technologies

When you build a site, do not ask people around what they should use and what they should be familiar with. If you use a technical means that you are not good at writing a website, it may be cool when you finish writing the site. Therefore, if ready-made software components are available, do not re-invent the wheel on your own. People say Python is good, but they only know PHP. If they are familiar with. net, it is good. It is not a shame to use bad technologies.

Clear architecture levels

The level of the architecture should be clearly determined in the initial stage. If they are all mixed up, once the business expands, it will be very painful if the original pile of things cannot be split.

Web Server <--> (AppServer) <--> Cache (eg. Memcached) <--> DB

One manifestation of hierarchical clarity is (taking the LAMP architecture as an example): even if there is only one machine, a Memcached instance should be created, which is indeed very effective. Generally, I don't tell him, I don't want to press everything on the DB, and all the I/O pressure on the DB goes to the disk. The problem will be exposed quickly. Yes, the DB itself will also use its own Cache, but the DB Cache and Memcached are designed differently.

How to view data redundancy correctly

Many people are not database design experts. If a project needs to design its own table structure or something, it is basically a temporary treasure, but many people remember the three paradigms, this is a headache for most small Web sites. A small project has dozens of tables. Forget the paradigm!

Keep in mind that the disk space price is never more expensive than the space price for the redundant data as much as possible. The more time you spend on the data layer, the less you invest in the product. Users are more concerned with product design.

Front-end optimization is very important

Because the traffic is low and there may not be many visitors, it is worth noting that the page should not be too large, most low-traffic websites suffer losses due to the frequent megabytes of a page (the homepage of a Startup page is 4 MB a few days ago, which is amazing). Users cannot open a page for half a minute, how do you develop? First meet the basic conditions, and then study the front-end optimization.

Exercise caution when adding features

Isn't there a 80/20 principle? Put the most important focus on the places that bring business value to you. Some fancy functions bring a lot of overhead, but have little effect. Remember, the most valuable thing for a small site is the business model, rather than how powerful your technology is. The technology is used to serve the business. Do not show off your skills.

Some websites are constantly adding features, which are just turning these new features into a straw.

Consider performance from the beginning

This is optional, but also important. Profile should be considered at the beginning of application design. Whether an application can be effectively optimized and expanded in the later stage is largely limited to the existence of a suitable Profile mechanism. It must be added that historical data must be taken into account for performance considerations.

A good architecture is not designed

This is the last thing to add. A good architecture is related to the initial design, but the most important thing is the evolution in development:

Development --> problem discovery --> feedback --> problem solving (Execution ability) --> Improvement --> evolution to the next stage -- emergence of new problems (loop)

Some sites are stuck at a certain stage, and may be stuck in execution. After the feedback from users comes up, there is no driving force for improvement. Finally, the dead pig is not afraid of boiling water. What I am most afraid of hearing is the toast "Business is not allowed". Imagine if the business is not improved, will the business be allowed? It is actually a psychological obstacle.

This article has a strong shanzhai style, so do not be too serious. If you are building some SHANZHAI websites in a short, flat, or fast manner, you can refer to the useful points for you. If you disagree, you can directly ignore them, there is no need to leave a message to argue.

Articles you may be interested in
  • Use the GZip compression function of PHP to compress website JS and CSS files to accelerate Website access.
  • 12 points are required for the design of a website homepage with good user experience
  • How to optimize servers, static databases, and load balancing for high-traffic websites
  • How does PHP enable compression and output for websites to increase website access speed?
  • MySQL index Operation Command (create index, re-index, query index, delete index) Summary
  • Principles of exchanging friend links with a php programmer's note website
  • PHP inventor talking about MVC and website design architecture
  • Google blog search enables the ping function to enable real-time indexing of website content

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.