Building High-performance Web site (Revised) Notes

Source: Internet
Author: User
Tags epoll browser cache
Building a High-performance Web site (Revised edition) 2012.6P14 ' feedback mechanism ':--> small batch Continuous delivery must be global address. (You can use neighbor Routing + end-to-end Ibe) Electromagnetic velocity: 2.3*10^8 of electrical signals in copper wire, fiber about 2*10^8 (total reflection increases transmission distance) system load:/PROC/LOADAVG context switch: Nmon iowait (Note: Disk IO is serial.) ) Reduce system calls ... Zerocopy. Aio. Strace: Every request must be detected. htaccess. (Oh, set allowoverride All) memory allocation: Apache is a multi-process + memory pool (prefork mode, VS work/m2m mode), while Nginx is single process multithreading: 10,000 inactive HTTP connections only 2.5MB of memory Long connection: KeepAliveTimeout 30 (default 5s) ab-n10000-c100 - k http://... Process blocking View: strace-p <PID> This tool is good. Synchronous non-blocking I/O: generally only valid for network I/O, o_nonblock multiple ready I/O: 4.2 BSD Select Unix V3 poll Linux 2.4 Sigio Edge RIM triggers the Sun solaris/dev/poll/dev/epoll:+mmap (saves FD replication.) Linux 2.6 Epoll:epollet (Lighttpdx,nginx support) FreeBSD kqueue memory map strace:open--> mmap2--> Writev--> (for small files Better, large files with sendfile) are directly i/o:o_direct, such as the InnoDB engine used to asynchronous I/O (it seems that the bottom is using kernel thread, and there is no native implementation. The dynamic script Acceleration zend/zend_language_scanner.l <--eventually maps to a call to the C function, but it does not seem to be the same as JIT. The author's so-called opcode may be for PHP, for Java should be byte code (bytecode) Apc.cache_by_default = ON or use Xcache/eaccelerator (well, this time HHVM hasn't come out yet) XDebug Xdebug_time_index () xdebug_start_code_coverage (); <--。 This is how to implement the profiler:xdebug.profiler_ouput_dir/name=...%p Kcachegrind graphical way to view browser cache negotiation: Last_modified/etag Do not negotiate: Expires (depending on server-side time.) CACHE-CONTROL:MAX-AGE=30 Web Cache Reverse Proxy: Reverse nat (DNAT)--> server cluster nginx:proxy_pass Squid--> varnish:http response header increased via: ... Field VCL. WordPress: Turn off admin cookies settings ESI--> Ajax user ip:+ http_x_forwarded_for Web Component Detach Video: Throughput is meaningless, as long as download speed > bitrate Distributed Caching (memcached, abbreviated) Database performance optimization p270 memcachedb Web load Balancing Dynamic DNS (RFC2126) Ipvs:lvs-nat lvs-dr (configuration method slightly) Sharing file System (abbreviated) content distribution and synchronization WebDAV, rsync, Inotify+hash tree points Fabric file System (mogilefs, abbreviated) database extension master-slave copy read-write Separation (reverse proxy: MySQL Proxy + LUA configuration<--good. This tool is very good. Vertical partition * Horizontal partition: Spock proxy (based on MySQL proxy) distributed computing: Gearman. Performance Monitoring (abbreviated)

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.