IT |
InfoQ |
AWS Lambda Supports Powertools for .NET to Simplify Observability |
https://www.infoq.com/news/2023/03/aws-lambda-powertools-net/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global
|
AWS Lambda Supports Powertools for NET to Simplify ObservabilityAWS recently announced that the open source library Lambda Powertools now supports NET The developer library helps implement observability when running Lambda functions based on NET or above reducing the amount of custom code By Renato Losio |
2023-03-12 06:10:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] うれしい、楽しい、超怖い! 「PSVR2」ゲーム体験版を全プレイした漫画家によるオススメの3本 |
https://www.itmedia.co.jp/news/articles/2303/12/news045.html
|
itmedianews |
2023-03-12 15:15:00 |
TECH |
Techable(テッカブル) |
最大60倍の望遠で、月も撮影できる!クリップ装着で多機種に対応するスマホ用望遠レンズ |
https://techable.jp/archives/199317
|
望遠レンズ |
2023-03-12 06:00:23 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
pyautogui で よく使うもの |
https://qiita.com/ma7ma7pipipi/items/94f2e306116b08f5afa3
|
timesleep |
2023-03-12 15:48:32 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
Rails7でバリデーションのエラーメッセージが表示されない問題を解決 |
https://qiita.com/amatouyamahodo/items/e608540d341de2058da7
|
appcontrollersgrow |
2023-03-12 15:57:03 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWS Security Token Service (STS) メモ |
https://qiita.com/KWS_0901/items/8736aeb5c8655015ab94
|
awssecuritytokenservice |
2023-03-12 15:48:01 |
golang |
Goタグが付けられた新着投稿 - Qiita |
[Go Snippet] パスワード生成用のランダムな文字列を返す関数 |
https://qiita.com/yNavS4Ki/items/f9b32c16e7345bb85756
|
gosnippet |
2023-03-12 15:02:15 |
golang |
Goタグが付けられた新着投稿 - Qiita |
入門プログラミングGo(型宣言、メソッド、配列、スライス、可変長引数、map) |
https://qiita.com/Kate941-su/items/3ff5cfd17864a63fbb27
|
pelongfloattypelargefloat |
2023-03-12 15:00:42 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
GItの取説(備忘録) |
https://qiita.com/ooyama-tetu/items/a66a70a090307ef15b55
|
gitinit |
2023-03-12 16:00:09 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
Git でコンフリクトが出たときの「現在の変更」と「入力側の変更」の見分け方 |
https://qiita.com/amatouyamahodo/items/0242d8faa44b5c1623d0
|
gitmerge |
2023-03-12 15:33:57 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Rails7でバリデーションのエラーメッセージが表示されない問題を解決 |
https://qiita.com/amatouyamahodo/items/e608540d341de2058da7
|
appcontrollersgrow |
2023-03-12 15:57:03 |
海外TECH |
DEV Community |
Use AI to commit like a PRO in 1 second |
https://dev.to/disukharev/how-to-git-commit-like-god-1g1b
|
Use AI to commit like a PRO in secondI struggled making commit messages since When you think of a commit message ーyou switch context from writing code When you switch context ーyou waste time Wasting time is lame I usually made line commits like amends fixed bug refactoring and then tried to come up with a good general message when merging a branch to production It has changed when ChatGPT was published There is an open source library OpenCommit The library uses conventional commits convention which makes commits concise and comprehensive You can also turn on GitMoji setting if you like Simply install it with npm npm i g opencommitAfter installing type oc and hit Enter in a terminal ocThat s it For more info read the docs |
2023-03-12 06:41:09 |
海外TECH |
DEV Community |
Finding a Needle in Haystack: Fixing Mysterious Bad Gateway |
https://dev.to/apoorvtyagi/finding-a-needle-in-haystack-fixing-mysterious-bad-gateway-1571
|
Finding a Needle in Haystack Fixing Mysterious Bad Gateway IntroductionAt my current org we have many applications running behind the API gateway that interacts with the outside world using REST APIs To track server side failures we built an alert system that nudges every time we get any XX error As soon as we made the alert system live we started noticing a few HTTP “Bad Gateway errors occurring every day but intermittently As per RFC the Bad Gateway status code indicates that the server while acting as a gateway or proxy received an invalid response from an inbound server it accessed while attempting to fulfill the request With very little known information I began chasing down the RCA for these failures DebuggingAs I started debugging the issue I wanted first to check what was going on in the application at the time when the particular request arrived However I discovered that this failed request never reached the server side application We also have a proxy server sitting in between our API gateway and the application so I checked the logs of that as well and fortunately I was able to track the request there I observed the request despite coming from the API gateway the response sent was without even communicating with my application Next I checked the throughput when such a response was sent as I thought maybe there was a limitation in the number of concurrent requests our application can handle But the result was again surprising because even when the throughput was lt TPM Transactions Per Minute the error persisted and we had already observed our applications working well even at a TPM of well over Based on these findings I realized that issue is not with our application code but with how our proxy server interacts with my application So I started diving deep into how HTTP connections are made during the request response cycle Diving in TCP ConnectionIn the realm of web communication HTTP Hypertext Transfer Protocol initiates a unique TCP Transmission Control Protocol connection for every request Setting up a TCP connection requires a three step handshake process with the server before transmitting data Once the data transmission is finished a four step process is implemented to terminate the same connection In some scenarios where limited data is transmitted the three and four step processes involved in establishing and terminating TCP connections can add a significant overhead To address this issue rather than opening and closing a socket for each HTTP request it is possible to keep a socket open for a more extended period and leverage it for multiple HTTP requests This mechanism is known as HTTP keep alive which permits clients to reuse existing connections for several requests The decision of when to terminate these open TCP sockets is managed by timeout configurations on either the client or target server or both This approach improves the efficiency of web communication and reduces latency An important point here to notice is that for a short amount of time there is a possibility that a connection can be “half open in which one side has terminated the connection but the other has not The side that has terminated can no longer send any data into the connection but the other side still can The terminating side continues reading the data until the other side terminates as well Now coming back to our story the proxy server acts as a messenger passing requests and responses back and forth If the service returns an invalid or malformed response rather than transmitting that meaningless information to the client the proxy server sends a error message This suggests that our application might have attempted to terminate the TCP connection but the proxy server was unaware of this and continued to send the request to the same socket This provided us with a critical hint in our investigation Debugging furtherThe Bad Gateway error could occur when the proxy server sends a request to the application and simultaneously the service terminates the connection by sending the FIN segment to the same socket The proxy socket acknowledges the FIN and starts a new handshake process Meanwhile the socket on the server side has just received a data request referring to the previous now closed connection As it is unable of handling it it sends a RST segment back to the proxy server The proxy server then returns a error to the user Based on this hypothesis we found the default HTTP keep alive time While the proxy server s keep alive time was set at seconds our application had a keep alive of only seconds This suggests that after seconds our application could close the connection and while this process is ongoing the proxy server could receive a request As it has not yet received the FIN it sends the request down the dead connection receives nothing in response and therefore throws a error To verify this hypothesis I modified the HTTP keep alive timeout of our application to ms in our development environment We then conducted load testing on our APIs and found a significant number of API failures due to the same error This confirmed our initial hypothesis FixA possible solution is to ensure that the upstream application idle connection timeout is longer than the downstream proxy connection timeout In practice this can be achieved by increasing the keep alive time of the application server to a value greater than the proxy s connection timeout For example in our setup I have increased the server s keep alive time from seconds to seconds which is second longer than the proxy server s connection timeout By doing so the downstream proxy server becomes the one to close the connections instead of the upstream server This ensures that there is no race condition between the two servers and eliminates the possibility of a error caused by a closed connection Therefore setting appropriate upstream and downstream timeouts is crucial for the smooth functioning of web applications The below example illustrates how to modify the default keep alive timeout for an Express app const express require express const app express const server app listen server keepAliveTimeout Time in ms ConclusionTheoretically this race condition can occur anytime when the connections are reused amp if the upstream service drops connections before the downstream In my case it was the proxy server that pre connects to all the backend servers and the TCP connection persists for reusing for further HTTP requests The Keep Alive time of this connection was seconds from the proxy and seconds from the app server This was causing a condition where the proxy thinks a connection is open but the backend closes it And when it sends the request down the same connection instead of getting the TCP ACK for the sent request the proxy gets TCP FIN and eventually RST from the upstream The proxy server then just gives up on such requests and responds immediately with HTTP error to the client And this is completely invisible on the application side That s why no application logs were visible to us To mitigate this you can either make sure the upstream application idle connection timeout is longer than the downstream proxy connection timeout OR implement retries on HTTP xx errors from the API gateway I hope you found it helpful Comments or corrections are always welcome |
2023-03-12 06:30:00 |
Apple |
AppleInsider - Frontpage News |
2023 MacBook Pro sale is in effect at B&H, save up to $200 instantly |
https://appleinsider.com/articles/23/03/12/2023-macbook-pro-sale-is-in-effect-at-bh-save-up-to-200-instantly?utm_medium=rss
|
MacBook Pro sale is in effect at B amp H save up to instantlyThe Apple reseller is discounting multiple models ranging from the standard inch MacBook Pro to the high end M Max inch MacBook Pro Save on the new MacBook Pro The MacBook Pro sale discounts numerous configurations with the inch and inch models up to off at B amp H Also included is free expedited shipping within the contiguous U S Read more |
2023-03-12 06:31:19 |
ニュース |
@日本経済新聞 電子版 |
日本時間13日発表の米アカデミー賞。作品賞には「エブリシング・エブリウェア・オール・アット・ワンス」「西部戦線異状なし」など10作品がノミネートしています。
https://t.co/oNDsdHnKRQ https://t.co/syGxtlVlKu |
https://twitter.com/nikkei/statuses/1634811514233188352
|
日本時間日発表の米アカデミー賞。 |
2023-03-12 07:00:12 |
ニュース |
@日本経済新聞 電子版 |
侍ジャパン、WBC準々決勝進出 1次リーグ2位以上確定
https://t.co/CXc9c285fO |
https://twitter.com/nikkei/statuses/1634802397221646336
|
侍ジャパン |
2023-03-12 06:23:59 |
ニュース |
BBC News - Home |
The Papers: Lineker 'chaos' pressures BBC chiefs and asylum plan |
https://www.bbc.co.uk/news/blogs-the-papers-64929493?at_medium=RSS&at_campaign=KARANGA
|
asylum |
2023-03-12 06:02:55 |
コメント
コメントを投稿