March 2008
March 15, 2008
replicate by pgpool
>> 構成
pgpool - 192.168.0.50
master - 192.168.0.11
secondary - 192.168.0.16
プライマリキーで取得するSELECTを3回発行するプログラム。
プライマリキーは1〜100000の中からランダムに生成。
データは10万件。
パフォーマンスが変わらずフェイルオーバーできるというのは結構良いかもしれない。
pgpool - 192.168.0.50
master - 192.168.0.11
secondary - 192.168.0.16
$ vi /usr/local/pgpool/etc/pgpool.conf listen_address = '192.168.0.50' port = 5433 backend_host_name = '192.168.0.11' backend_port = 5432 secondary_backend_host_name = '192.168.0.16' secondary_backend_port = 5432 replication_mode = true load_balance_mode = true>> ベンチマーク
プライマリキーで取得するSELECTを3回発行するプログラム。
プライマリキーは1〜100000の中からランダムに生成。
データは10万件。
$ ab -n 500 -c 100 -k http://www.example.com/testapp[ 単一サーバ(192.168.0.11) ]
Requests per second: 247.18 [#/sec] Time per request: 4.046 [ms] Requests per second: 273.41 [#/sec] Time per request: 3.658 [ms] Requests per second: 269.48 [#/sec] Time per request: 3.711 [ms][ load barancing & connection pooling ]
Requests per second: 261.33 [#/sec] Time per request: 3.827 [ms] Requests per second: 261.51 [#/sec] Time per request: 3.824 [ms] Requests per second: 256.63 [#/sec] Time per request: 3.897 [ms]後者の方が気持ち速いが、ほとんど変わらず。コネクションプーリングによるパフォーマンス向上がバランサ(というかpgpool自体)のオーバーヘッドで相殺されている感じ。
パフォーマンスが変わらずフェイルオーバーできるというのは結構良いかもしれない。
March 13, 2008
March 12, 2008
html specification
要素の属性値に"<"や">"は使用可能なのか。
HTMLの仕様を覗いてみると、次のような記述が見つかった。
でもこのバリデーションにはこける。
http://validator.w3.org/
"should"ではなく"must"なのだろうか。
HTMLの仕様を覗いてみると、次のような記述が見つかった。
Authors wishing to put the "<" character in text should use "<" (ASCII decimal 60) to avoid possible confusion with the beginning of a tag (start tag open delimiter). Similarly, authors should use ">" (ASCII decimal 62) in text instead of ">" to avoid problems with older user agents that incorrectly perceive this as the end of a tag (tag close delimiter) when it appears in quoted attribute values."<"や">"を使用すべきといってるものの、"<"や">"は使用できないと言ってるわけではなさそうだ。
でもこのバリデーションにはこける。
http://validator.w3.org/
"should"ではなく"must"なのだろうか。