记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
 
0

Varnish调优手记

发表者:分类:应用服务2013-11-24 15:49:03 阅读[2655]
目录[-] 一、介绍二、安装RPM安装编译安装安装依赖包安装pcre编译三、VCL执行过程四、通过日志调优五、负载均衡六、优雅模式和神圣模式Grace modeSaint mode七、完整示例八、管理命令varnishncsa(以 NCSA 的格式显示日志) varnishlog(varnish详细日志)varnishtop varnishstat varnishadm    最近公司做活动推广,流量暴增,后端服务器压力山大,导致用户的请求响应时间延长,客户因此抱怨声音很大。   为尽快解决问题,在安排人员不断优化后端代码的同时,考虑在nginx前增加varnish缓存层,只透传部分动态请求过去,直接减少后端服务器的压力。   在实际使用中,真正感受到了varnish服务器强大的威力!在不断的调优缓存命中率后,后端服务器cpu直接从80%降到了20%,再大的并发前端也可以直接消化,后端服务器表示毫无压力。有了这玩意,可以再也不用在后台写定时任务,不断重新生成静态页面了,直接丢缓存里完事!此外,varnish还支持一种叫“神圣模式”,在后端服务器报错返回500的时候,varnish还能继续优先返回过去缓存的内容,为用户屏蔽部分错误,这东东有时真算是救命稻草啊。   但同...
 
0
假设一个普通用户trunk,首先以trunk登陆:su root 临时切换到root用户,需要输入密码,切换后环境变量不变,取得root的部分权限,且只能使用trunk用户path路径中的命令,不能使用root用户path路径中的独有命令。su - root 切换为root用户,需要输入密码,切换后环境变量改变,几乎可以不受限制的做任何事。su - trunk 从root切换回普通用户,无需输入密码,切换后只拥有trunk权限。
CentOS 6 graphical install on XenServer 6 l I normally do graphical installs with CentOS by using the Install from URL option in the New VM wizard. If you don't want to install from a public CentOS repository you can copy the contents of the CentOS DVD to a web server on your LAN. So the process is as follows.Choose Install from URL and input a Cen...
Oracle进em后 到实例的代理连接 状态 失败 详细资料 ORA-12505: TNS: 监听程序当前无法识别连接描述符中所给出的 SID (DBD ERROR: OCIServerAttach) 使用以下命令  # $ORACLE_HOME/bin/agtctl start再次进EM会就正常使用了。
参考了oracle 文档中的脚本内容。发现在Redflag linux 6sp3里面,只能开机有用,关机就不能正常执行脚本。后来发现问题所在,要在关机时执行关机脚本,必需有oracle对应文件生成在/var/lock/subsys文件夹下面才行。然后就按其中的sshd脚本样式,照葫芦画瓢,修改了oracle脚本。以下是脚本内容。#!/bin/bash## Init file for Oracle11g Server## chkconfig: 345 99 01# description: Oracle11g ServerORACLE_HOME=/data/app/oracle/product/11.2.0/db_1ORACLE_OWNER=oracleif [ ! -f $ORACLE_HOME/bin/dbstart ]then     echo "Oracle startup: cannot start"  exitfiRETVAL=0start(){      echo "Starting Oracle Database..."      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"        echo "Done."           echo "Starting Oracle Listeners ..."             su - $ORACLE_OWNER -c "$ORACLE_HOME/bi...
Linux Oracle服务启动&停止脚本 在CentOS 6.3下安装完Oracle 10g R2,重开机之后,你会发现Oracle没有自行启动,这是正常的,因为在Linux下安装Oracle的确不会自行启动,必须要自行设定相关参数,首先先介绍一般而言如何启动oracle。一、在Linux下启动Oracle登录到CentOS,切换到oracle用户权限# su – oracle接着输入:$ sqlplus "/as sysdba"原本的画面会变为SQL>接着请输入SQL> startup就可以正常的启动数据库了。另外停止数据库的指令如下:SQL> shutdown immediate二、检查Oracle DB监听器是否正常回到终端机模式,输入:$ lsnrctl status检查看看监听器是否有启动如果没有启动,可以输入:$ lsnrctl start启动监听器SQL> conn sys@orcl as sysdba然后输入密码,sys以sysdba身份登入数据库。三、启动emctl另外也可以发现http://localhost.localdomain:1158/em 目前是没有反应的,这边要另外启动,启动的指令如下:$ emctl start dbconsole这个指令运行时间较长,执行完的画面如下:手动启动Oracle数据库完毕,下面创建系统自行启动Oracle的脚本。四、Oracle启动&停止脚本 1. 修改Oracle系统配置文件:/etc/oratab,只有这样,Oracle 自带...
Web应用防火墙 FreeWAF FreeWAF是一款开源的Web应用防火墙产品,其命名为FreeWAF,它工作在应用层,对HTTP进行双向深层次检测:对于来自Internet的 攻击进行实时防护,避免黑客利用应用层漏洞非法获取或破坏网站数据,可以有效地抵御黑客的各种攻击,如SQL注入攻击、XSS攻击、CSRF攻击、缓冲区 溢出、应用层DOS/DDOS攻击等;同时,对Web服务器侧响应的出错信息、恶意内容及不合规格内容进行实时过滤,避免敏感信息泄露,确保网站信息的可靠性。 软件首页软件下载
Hi, I'm trying to install pdksh as part of the required packages for Oracle 11G# tar zxvf pdksh.tar.gz # cd pdksh# ./configure --prefix=/usrWhen I try to "make" got the following errorCONFIG_FILES="" CONFIG_HEADERS=config.h ./config.statuscreating.h is unchangeddate > stamp-hconfig.h is unchangeddate > stamp-h./siglist.sh "gcc -E -DHAVE_CONFIG -IO. -I" < ./siglist.in > tmpsiglist.outsort: open failed: +2n: No such file or directorymake: ** [siglist.out] Error 1解决方法 ,添加环境变量:# export _POSIX2_VERSION=199209再次make 就正常了。Quote:sort: open failed: +2n: No such file or directoryThe new POSIX standard does not support the syntaxCode:sort +2nanymore, hence the error you get. A workaround is to specify an older POSIX standard. Just do:Code:export _POSIX2_VERSION=199209in the same terminal where you're compiling and the trick is done!  #  make install./mkinstalldirs /usr/local/bin /usr/local/man/man1/usr/bin/install -c ks...
ڵȨ鿴־
Centos 6.364位 最小安装系统配置DRDB-8.4# yum install wget gcc g++ automake make l kernel-devel flex  autoconf -y# tar -zxvf drbd-8.4.tar.gz# cd drbd-8.4# ./configure --prefix=/usr/local/drbd  --with-km# make# make install#ln -s /usr/local/drbd/etc/rc.d/init.d/drbd /etc/init.d/drbd# chkconfig --add drbd# chkconfig drbd on#  mkdir -p /usr/local/drbd/var/run/drbd2. 修改主机名主服务器作以下修改# vi  /etc/hosts 192.168.1.20  web20 web20.yupan.com备份服务器作以下修改# vi  /etc/hosts 192.168.1.50 web50 web50.yupan.com 重启网络生效 /etc/rc.d/init.d/network restart 关闭IPtables 与selinux,具体就不说了。3. 准备磁盘,划分分区  创建 drbd 虚拟设备:   mknod /dev/drbd0 b 147 0  4.  drbd.conf 配置文件# You can find an example in  /usr/share/doc/drbd.../drbd.conf.example#include "drbd.d/global_common.conf";#include "drbd.d/*.res";  # 是否参加DRBD使用者统计.默认是yes       ...
    总共269页,当前第181页 | 页数:
  1. 171
  2. 172
  3. 173
  4. 174
  5. 175
  6. 176
  7. 177
  8. 178
  9. 179
  10. 180
  11. 181
  12. 182
  13. 183
  14. 184
  15. 185
  16. 186
  17. 187
  18. 188
  19. 189
  20. 190
  21. 191