<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiroyukim</author_name>
  <author_url>https://blog.hatena.ne.jp/hiroyukim/</author_url>
  <blog_title>雑なメモ書き</blog_title>
  <blog_url>https://hiroyukim.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>http://go-database-sql.org/surprises.html こちらのページに書かれている Opening and closing databases can cause exhaustion of resources. が気になったのでwrkで負荷をかけてみた。 条件 dockerでmysqlを立ち上げる SelectとUpdateが単純に走るだけのhandlerを設置したgoのserverを立ち上げる 1. 最初にdbオブジェクトを初期化して持ち回す方法 2. リクエストのたびにdbオブジェクトをOpenする方法 上記2つを検証した 結論 wrk -c 2 -t 1 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiroyukim.hatenablog.com%2Fentry%2F2019%2F03%2F04%2F015432&quot; title=&quot;goのsql/databaseの接続でやり方間違えると資源枯渇したりして大変らしいので負荷をかけてみた - 雑なメモ書き&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-04 01:54:32</published>
  <title>goのsql/databaseの接続でやり方間違えると資源枯渇したりして大変らしいので負荷をかけてみた</title>
  <type>rich</type>
  <url>https://hiroyukim.hatenablog.com/entry/2019/03/04/015432</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
