找回firefox的标签点击关闭功能
08-9
最近,一友找我去优化apache,了解后,是vsuch.com网站的问题。
vsuch网站使用lamp+windows混合平台(汗),追究历史,原来网站用.net编写,后用php重构了整个网站。
整改前 Mysql运行在linux机器上,php运行在windows平台上,中间局域网方式连接。
网站日访问量不小,alexa排名6800,windows平台明显抗不住,经常莫名其妙的问题。(题外话:我最早维护的服务器也是windows,apache在上边很不稳定)
了解后,我感觉一台服务器就足矣,放弃了apache的方案,安装了nginx+php,数据库依然沿用原来的。
整改后,linux负载稍稍升高,mysql负载不变,http的负载在nginx下并没有表现出多高。顺利完成了迁移。
后公司又开通了cdn服务(有钱),速度有了很明显的提升。
-----------------------------------------
根据其公司目前的技术结构,我提出了很多优化和整改的想法,希望每个创业网站都能走好。
-----------------------------------------
singlekui@gmail.com: 孙. 谢谢你帮忙了. 我拿100元给买包烟抽抽. ![]()
我: ……
singlekui@gmail.com: 可以吗.也别介意呀.
我: 算了
就当玩了
singlekui@gmail.com: 啊..
说了给你点报酬的呢.
9:55 我: 就当玩了
做技术的,很多时候要学会一笑了之。
vs.
if (!isset($foo{5})) { echo “Foo is too short”; }
Calling isset() happens to be faster then strlen() because unlike strlen(), isset() is a language construct and not a function meaning that it’s execution does not require function lookups and lowercase. This means you have virtually no overhead on top of the actual code that determines the string’s length.