<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title></title>
<META http-equiv=Content-Type content="text/html; charset=windows-1251">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
  margin: 5px 5px 5px 5px;
  background-color: #ffffff;
}
/* ---------- Text Styles ---------- */
hr { color: #000000}
body, table /* Normal text */
{
 font-size: 9pt;
 font-family: 'Courier New';
 font-style: normal;
 font-weight: normal;
 color: #000000;
 text-decoration: none;
}
span.rvts1 /* Heading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #0000ff;
}
span.rvts2 /* Subheading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #000080;
}
span.rvts3 /* Keywords */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-style: italic;
 color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
span.rvts6
{
 font-size: 11pt;
 font-family: 'tahoma';
 font-weight: bold;
 color: #ffffff;
 background-color: #0000ff;
}
span.rvts7
{
 font-size: 11pt;
 font-family: 'tahoma';
}
span.rvts8
{
 font-size: 11pt;
 font-family: 'tahoma';
 font-weight: bold;
}
a.rvts9, span.rvts9
{
 font-size: 11pt;
 font-family: 'tahoma';
 color: #0000ff;
 text-decoration: underline;
}
span.rvts10
{
 font-size: 8pt;
 font-family: 'arial';
 font-style: italic;
 color: #c0c0c0;
}
a.rvts11, span.rvts11
{
 font-size: 8pt;
 font-family: 'arial';
 color: #0000ff;
 text-decoration: underline;
}
/* ---------- Para Styles ---------- */
p,ul,ol /* Paragraph Style */
{
 text-align: left;
 text-indent: 0px;
 padding: 0px 0px 0px 0px;
 margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
 text-align: center;
}
--></style>
</head>
<body>

<p>Здравствуйте, Alexey.</p>
<p><br></p>
<p>Разница в трафике я вычислил почему - шлюз берет с бекендов все и сразу, а отдает не всегда все и медленно.</p>
<p><br></p>
<p>Вопрос к опытным людям. Какой винт по соотношению цена/качество будет лучше для бекендов?</p>
<p><br></p>
<p>1. SATA RAID 1</p>
<p>2. SAS RAID 1</p>
<p>3. SATA RAID 5</p>
<p><br></p>
<p>На варианте 1 стоит две ноды</p>
<p>На варианте 2 стоит третья</p>
<p><br></p>
<p>2xSAS выдерживает weight=4</p>
<p>2xSATA weight=1</p>
<p>2xSATA weight=1</p>
<p><br></p>
<p>При такой конфигурации загрузка винтов примерно одинакова. САС очень дорогой. САТА дешевый, но тормоз )</p>
<p>Думаю насчет рейд5.</p>
<p><br></p>
<p>Шлюз</p>
<p>==================================================</p>
<p>user &nbsp;nginx;</p>
<p>worker_processes &nbsp;5;</p>
<p><br></p>
<p>error_log &nbsp;/usr/home/logs/nginx.err crit;</p>
<p>pid &nbsp; &nbsp; &nbsp; &nbsp;/var/run/nginx.pid;</p>
<p><br></p>
<p><br></p>
<p>events {</p>
<p>&nbsp; &nbsp; worker_connections &nbsp;4096;</p>
<p>&nbsp; &nbsp; use kqueue;</p>
<p>}</p>
<p><br></p>
<p>http {</p>
<p>&nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; mime.types;</p>
<p>&nbsp; &nbsp; default_type &nbsp;application/octet-stream;</p>
<p><br></p>
<p>&nbsp; &nbsp; limit_zone def $binary_remote_addr 10m;</p>
<p><br></p>
<p>&nbsp; &nbsp; access_log &nbsp;off;</p>
<p><br></p>
<p>&nbsp; &nbsp; sendfile &nbsp; &nbsp; &nbsp; &nbsp;on;</p>
<p>&nbsp; &nbsp; tcp_nopush &nbsp; &nbsp; on;</p>
<p>&nbsp; &nbsp; send_timeout &nbsp; &nbsp; &nbsp; &nbsp;30;</p>
<p>&nbsp; &nbsp; tcp_nodelay &nbsp; &nbsp; &nbsp; &nbsp;on;</p>
<p><br></p>
<p><br></p>
<p>&nbsp; &nbsp; keepalive_timeout &nbsp;0;</p>
<p>&nbsp; &nbsp; client_body_temp_path /home/nginx/client_body_temp 1 2;</p>
<p>&nbsp; &nbsp; proxy_temp_path /home/nginx/proxy_temp;</p>
<p><br></p>
<p>&nbsp; &nbsp; geo $geo {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; default US;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; include geo.conf;</p>
<p>&nbsp; &nbsp; }</p>
<p><br></p>
<p>&nbsp; &nbsp; upstream static {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; server 10.0.0.3:80 weight=4;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; server 10.0.0.4:80;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; server 10.0.0.5:80 weight=2;</p>
<p>&nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; server {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; listen &nbsp; &nbsp; &nbsp; 1.1.1.1:80 default accept_filter=httpready;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; limit_conn &nbsp; def &nbsp;8;</p>
<p><br></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; if ($geo ~ "^(CN|AP|AF|IN|IR|KR|MN|PK|PS|TR|TW|VN|YE)$")</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite ^(.+?\.php)$ /func/redir.php?url=$1 last;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 403;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; location / {</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_pass &nbsp; http://static;</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p><br></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp;location = /nstatus {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stub_status on;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; access_log &nbsp; off;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; }</p>
<p>}</p>
<p>==================================================</p>
<p><br></p>
<p>Бекенд</p>
<p>==================================================</p>
<p>user &nbsp;nginx;</p>
<p>worker_processes &nbsp;10;</p>
<p><br></p>
<p>error_log &nbsp;/home/logs/nginx.err crit;</p>
<p>pid &nbsp; &nbsp; &nbsp; &nbsp;/var/run/nginx.pid;</p>
<p><br></p>
<p>events {</p>
<p>&nbsp; &nbsp; worker_connections &nbsp;2048;</p>
<p>&nbsp; &nbsp; use kqueue;</p>
<p>}</p>
<p><br></p>
<p><br></p>
<p>http {</p>
<p>&nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; mime.types;</p>
<p>&nbsp; &nbsp; default_type &nbsp;application/octet-stream;</p>
<p><br></p>
<p>&nbsp; &nbsp; access_log &nbsp;off;</p>
<p><br></p>
<p>&nbsp; &nbsp; sendfile &nbsp; &nbsp; &nbsp; &nbsp;on;</p>
<p>&nbsp; &nbsp; tcp_nopush &nbsp; &nbsp; on;</p>
<p>&nbsp; &nbsp; send_timeout &nbsp; &nbsp; &nbsp; &nbsp;30;</p>
<p>&nbsp; &nbsp; keepalive_timeout &nbsp;0;</p>
<p>&nbsp; &nbsp; tcp_nodelay &nbsp; &nbsp; &nbsp; &nbsp;on;</p>
<p>&nbsp; &nbsp; client_body_temp_path /var/spool/nginx/client_body_temp 1 2;</p>
<p>&nbsp; &nbsp; proxy_temp_path /var/spool/nginx/proxy_temp;</p>
<p><br></p>
<p>&nbsp; &nbsp; server {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; listen &nbsp; &nbsp; &nbsp; 10.0.0.5:80;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; server_name static;</p>
<p><br></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; access_log off;</p>
<p><br></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; location / {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root &nbsp; /usr/home/htdocs;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index &nbsp;index.html index.htm;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p><br></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; location ~ ^/func {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deny all;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; }</p>
<p>}</p>
<p>==================================================</p>
<p>Вы писали 14 листопада 2007 р., 16:10:36:</p>
<p><br></p>
<p>&gt;&gt; незнаю, почему такая разница по трафику, но:&nbsp;</p>
<p>&gt;&gt; настройки в студию, дебаг логи посмотрите&nbsp;</p>
<p>&gt;&gt; gzip используется в нгинх-е?&nbsp;</p>
<p><br></p>
<p><br></p>
<p><span class=rvts10>--&nbsp;</span></p>
<p><span class=rvts10>С уважением,</span></p>
<p><span class=rvts10>&nbsp;Pentarh &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><a class=rvts11 href="mailto:lists@pentarh.com">mailto:lists@pentarh.com</a></p>

</body></html>