Open in app

Sign In

Write

Sign In

none
none

2 Followers

Home

About

Jun 15, 2022

Assuming you are aware of nginx proxy pass, nginx caches the response from upstream including the…

A bug caused by nginx serving item from stale cache Assuming you are aware of nginx proxy pass, nginx caches the response from upstream including the upstream response headers. Our api was fronted by an nginx service which proxied the requests to the backend api service. We enabled cors for…

Nginx

1 min read

Nginx

1 min read


Mar 13, 2022

Spell checkers, word2vec, fastext

This is more about my journey into the web for understanding the nuances of custom word dictionaries and in the process coming across spell checker’s . Lets assume you have a misspelled word and you want a list of the possible corrections. Peter Norvig’s post is one of the famous…

Word2vec

3 min read

Word2vec

3 min read


Feb 5, 2022

Postgres replica conflicts: Part 2

How to avoid and what is max_standby_streaming_delay There are many references which describe how to fix the snapshot replica conflict.I will mention some of them at the end of this post. All the below tweaks are on the replica. max_standby_streaming_delay is one of those parameters which can be tweaked for…

Postgres

3 min read

Postgres replica conflicts: Part 2
Postgres replica conflicts: Part 2
Postgres

3 min read


Feb 5, 2022

Postgres replica conflicts: Part 1

Why do we get replica conflicts and the reason. Error We were occasionally seeing the below errors in our app logs when some queries run on the postgres replica. “Canceling statement due to conflict with recovery” Background There are many reasons why conflicts can occur on a hot standby(replica) as…

Postgres

3 min read

Postgres replica conflicts: Part 1
Postgres replica conflicts: Part 1
Postgres

3 min read


Jan 31, 2022

Posgres Concurrency Notes: 2

Postgres has 3 transaction isolation levels. Read Committed Repeatable Read Serializable Here I will be highlighting few points gleaned across the web which we might otherwise overlook.There is detailed explanation here. Repeatable Read Repeatable read though it sounds odd does not guarantee that reads are repeatable in a transaction.Phantom reads are…

Postgres

2 min read

Postgres

2 min read


Jan 30, 2022

Posgres Concurrency Notes: 1

Excerpts from the official docs I am just highlighting the points from this doc on concurrency. Transactions need correct behavior and performance “Correct behavior” basically means serializability. The transactions should appear to execute one at a time, in isolation. When two transactions physically overlap in time, we don’t care which…

Postgres

5 min read

Postgres

5 min read


Jan 19, 2022

x-www-form-urlencoded vs form-data

Recently I was integrating an email api, and I was able to find the sample snippets in curl and other languages as well.That’s cool! But the API reference page did not mention the Content Type that their api’s accept.What do you accept ? application/json application/x-www-form-urlencoded multipart/form-data Ofcourse the curl snippets that they provided use -F flag which signifies multipart/form-data. And -d in curl signifies application/x-www-form-urlencoded.

Rest Api

1 min read

Rest Api

1 min read


Jan 7, 2022

Java String.replace vs Javascript String.prototype.replace

Java String.replace replaces all occurrences of a given string with the replacement string. JS String.prototype.replace replaces only the first occurrence if the pattern is a string. Now before this proposal which became a part of ES12(2021), if we had to replace all occurrences of a given pattern with a replacement…

Nodejs

2 min read

Nodejs

2 min read


Jan 6, 2022

node pg and postgres jsonb data type

The corner case If you use node pg client to query postgres, it tries to map node data types to postgres data types and vice versa.Ofcourse to some extent. From the docs JavaScript has great support for JSON and node-postgres converts json/jsonb objects directly into their JavaScript object via JSON.parse…

Postgres

1 min read

Postgres

1 min read


Oct 16, 2021

AWS Aurora postgres benchmarking with pgbench notes

traps to escape when database performance benchmarking I recently had to benchmark AWS Aurora and used pgbench for quick idea of the database performance without much ado. Below are few points which you might want to keep in mind. Setup Client Instance vCPU*| Mem (GiB)| Storage Dedicated EBS Bandwidth (Mbps) |…

Benchmarking

2 min read

AWS Aurora postgres benchmarking with pgbench notes
AWS Aurora postgres benchmarking with pgbench notes
Benchmarking

2 min read

none

none

2 Followers

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams