[{"data":1,"prerenderedAt":362},["ShallowReactive",2],{"project-35501718":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":45,"post_text":47,"what":48,"said":98,"maker_in_thread":200,"shape":206,"grid":210,"attempts":324,"same_week":325,"maker_shows":353,"maker_hidden":354,"reader_version":355,"card":356},"35501718","Supavisor","a Postgres connection pooler written in Elixir","title","Show HN: Supavisor – a Postgres connection pooler written in Elixir","https:\u002F\u002Fgithub.com\u002Fsupabase\u002Fsupavisor","github.com","kiwicopple",1681039765,2023,149,49,416,3109,14,"notable","infrastructure","connection pooler","other",[24,25,26,27,28],"postgres connection pooler","pgbouncer alternative","elixir","multi-tenant postgres","connection pooling","curious",0.094,{"positive":32,"neutral":33,"mixed":34,"critical":35},6,18,0,3,27,{"performance":38,"execution":40,"docs":41,"idea":42,"design":44},{"positive":34,"critical":39},1,{"positive":39,"critical":39},{"positive":34,"critical":34},{"positive":43,"critical":39},2,{"positive":39,"critical":34},[35,34,34,34,34,35,34,34,34,34,34,34,35,34,34,46,35,35,35,35,35,35,34,46,39,35,35,35,46,46,34,46,34,34,34,39,35,35,35,35],5,null,{"problem":49,"audience":56,"pricing":47,"motivation":60,"time_to_build":47,"stack":64,"openness":95,"stage":96,"team_size":97},{"value":50,"source":51,"evidence":52},"Manages many client connections to Postgres efficiently, similar to PgBouncer, with multi-tenancy support.","maker",[53],{"id":54,"by":11,"text":55},"35501733","hey hn, supabase ceo here this is a postgres connection pooler. it’s similar to pgbouncer, but built with Elixir and specifically designed for multi-tenancy. it’s still under…",{"value":57,"source":51,"evidence":58},"Teams running Postgres at scale, including Supabase databases.",[59],{"id":54,"by":11,"text":55},{"value":61,"source":51,"evidence":62},"Handle connection scaling for Supabase databases in multi-tenant setups.",[63],{"id":54,"by":11,"text":55},[65,69,81,89],{"value":66,"source":51,"evidence":67},"Elixir",[68],{"id":54,"by":11,"text":55},{"value":70,"source":71,"evidence":72},"Erlang\u002FBEAM","commenter",[73,77],{"id":74,"by":75,"text":76},"35504484","PKop","Runs on the Erlang Virtual Machine, also known as the BEAM. Erlang was built for scalability and fault tolerance of telephone switches by Ericsson in the 80's. Give this a watch,…",{"id":78,"by":79,"text":80},"35512767","chasers","It is very BEAMy because we love the BEAM. All connections are supervised :D Might be a little too close to \"supervisor\" though. > To what extent are these metrics distorted by…",{"value":82,"source":83,"evidence":84},"poolboy","inferred",[85],{"id":86,"by":87,"text":88},"35507840","losvedir","Looking at the repo's mix file it seems to use poolboy for pooling. Given that dashbit and José helped out, was nimble_pool considered?",{"value":90,"source":71,"evidence":91},"syn",[92],{"id":93,"by":79,"text":94},"35502113","Contributor here. Happy to answer any questions. An interesting bit... the syn library helps us guarantee there is only one connection pool alive on the cluster at a time and…","open_source","beta","company",{"praise":99,"objections":121,"requests":145,"questions":167,"alternatives":186},[100,110],{"value":101,"source":71,"evidence":102},"Elixir and BEAM suit this kind of tool well.",[103,106],{"id":104,"by":79,"text":105},"35504898","Binary pattern matching is great for working with protocols. Erlang process monitoring makes it very easy to handle client disconnects. And Elixir makes using Erlang a bit more…",{"id":107,"by":108,"text":109},"35505991","abc3erl","I completely agree with chasers's points. Moreover, Elixir's excellent concurrency support and its fault-tolerant nature make it well-suited for handling a high number of…",{"value":111,"source":71,"evidence":112},"Excited for a PgBouncer alternative.",[113,117],{"id":114,"by":115,"text":116},"35507608","krainboltgreene","I am so glad this exists, great work.",{"id":118,"by":119,"text":120},"35501924","dijonmusters","This is so cool! Have been needing something like this for a long time! The Supabase team smashed it on this one!",[122,132,139],{"value":123,"source":71,"evidence":124},"Lacks routing of reads and writes across nodes.",[125,129],{"id":126,"by":127,"text":128},"35514589","vladsanchez","My issue with poolers has always been routing. This solution works in a vanilla cluster but not in a multi-node one. Can Supavisor route Reads across multiple nodes and Writes to…",{"id":130,"by":79,"text":131},"35514855","Not yet but we definitely are going to do that.",{"value":133,"source":71,"evidence":134},"Benchmark throughput seems low for BEAM.",[135],{"id":136,"by":137,"text":138},"35506930","jhgg","at work we run pgbouncer on 4 vCPU (GCP c2-standard-4) machines, at 60% load, and they do ~15k TPS at peak, however we only peak at ~45k connections per node. however, i think…",{"value":140,"source":71,"evidence":141},"Elixir clients can already pool via Ecto and DBConnection.",[142],{"id":143,"by":79,"text":144},"35511857","You could bring it in as an application but you already get pooling with Ecto via Postgrex and DBConnection. If you're using Elixir there's really no need for separate connection…",[146,156,163],{"value":147,"source":71,"evidence":148},"Support prepared statements in transaction pooling mode.",[149,153],{"id":150,"by":151,"text":152},"35507875","phamilton","Feature request that would make me consider moving off of pgbouncer: make prepared statements work in transaction pooling mode. We've found that we can double our throughput by…",{"id":154,"by":151,"text":155},"35509065","I don't believe that provides the performance improvements we desire. The main reason prepared statements improves throughout is that it caches query plans. As I understand it,…",{"value":157,"source":71,"evidence":158},"HTTP connections for serverless environments.",[159],{"id":160,"by":161,"text":162},"35508467","koolba","> It will eventually be able to handle multiple types of connections: traditional TCP connections, and HTTP connections for developers who are connecting to Postgres in…",{"value":164,"source":71,"evidence":165},"Read\u002Fwrite routing across multiple nodes.",[166],{"id":126,"by":127,"text":128},[168,175,179],{"value":169,"source":71,"evidence":170},"How telemetry metrics are affected by the pooler.",[171],{"id":172,"by":173,"text":174},"35512570","Dowwie","Why not call this SupaPool? Supavisor is very BEAMie. Question about telemetry. These are the metrics emitted by Ecto: - :idle_time - the time the connection spent waiting before…",{"value":176,"source":71,"evidence":177},"Why poolboy instead of nimble_pool.",[178],{"id":86,"by":87,"text":88},{"value":180,"source":71,"evidence":181},"Whether it can run as a library in an Elixir app.",[182],{"id":183,"by":184,"text":185},"35510363","victorbjorklund","Perhaps a dumb question but can you run it as a library in an existing elixir app to pool the connections of the app?",[187,192,196],{"value":188,"source":71,"evidence":189},"PgBouncer",[190,191],{"id":150,"by":151,"text":152},{"id":136,"by":137,"text":138},{"value":193,"source":71,"evidence":194},"pgpool",[195],{"id":126,"by":127,"text":128},{"value":197,"source":71,"evidence":198},"Ecto\u002FPostgrex\u002FDBConnection pooling",[199],{"id":143,"by":79,"text":144},{"comments":43,"answered":39,"key":201},[202,205],{"id":203,"text":204},"35501991","it's custom, built with figma. we have a library of assets that our design team use. I can ask if they can open source it if you would find it useful",{"id":54,"text":55},{"commenters":207,"max_depth":208,"maker_replies":43,"first_comment_mins":39,"lifespan_hours":209},21,9,82,[211,213,216,218,220,222,224,226,228,230,232,234,237,239,241,243,246,250,252,256,258,260,261,264,266,268,270,274,275,278,281,284,285,287,289,291,293,296,298,301,304,305,309,310,311,313,316,318,320,322],[150,34,35,212,151,34],"project\u002Fneutral\u002Fperformance",[214,34,34,215,79,34],"35508520","commenter\u002Fneutral\u002Fnone",[154,34,34,217,151,34],"commenter\u002Fneutral\u002Fperformance",[219,34,34,215,79,34],"35511823",[221,34,34,215,151,34],"35513304",[223,34,34,215,79,34],"35513920",[225,34,35,212,79,34],"35514162",[227,34,34,215,151,34],"35515105",[229,34,34,215,79,34],"35516136",[231,34,34,215,151,34],"35516836",[233,34,34,215,79,34],"35516417",[235,34,34,215,236,34],"35510056","sitharus",[238,34,34,215,151,34],"35518143",[240,34,34,215,79,34],"35519483",[242,34,34,215,151,34],"35520177",[244,34,35,245,79,34],"35526665","project\u002Fneutral\u002Fnone",[247,34,34,248,249,34],"35533654","other\u002Fneutral\u002Fnone","vira28",[251,34,34,248,151,34],"35547526",[253,39,35,254,255,34],"35502158","maker\u002Fneutral\u002Fnone","egorr",[93,43,46,257,79,34],"project\u002Fpositive\u002Fexecution",[172,35,35,259,173,34],"project\u002Fneutral\u002Fdocs",[78,35,35,254,79,34],[86,262,35,263,87,34],4,"project\u002Fneutral\u002Fexecution",[265,262,35,263,79,34],"35508392",[160,46,35,267,161,34],"project\u002Fneutral\u002Fidea",[269,46,35,267,79,34],"35508585",[271,32,35,272,273,34],"35501972","project\u002Fneutral\u002Fdesign","techn00",[203,32,34,272,11,39],[276,32,46,277,273,34],"35503482","project\u002Fpositive\u002Fdesign",[279,32,35,272,280,34],"35503910","mildmustard",[126,282,39,283,127,34],7,"project\u002Fcritical\u002Fexecution",[130,282,35,263,79,34],[183,286,35,267,184,34],8,[143,286,39,288,79,34],"project\u002Fcritical\u002Fidea",[118,208,46,290,119,34],"project\u002Fpositive\u002Fidea",[114,292,46,290,115,34],10,[294,292,46,295,79,34],"35511864","maker\u002Fpositive\u002Fnone",[54,297,34,267,11,39],11,[299,297,46,295,300,34],"35502285","abc3sts",[302,297,34,248,303,34],"35503665","alexdanilowicz",[74,297,34,248,75,34],[306,297,34,307,308,34],"35521268","other\u002Fpositive\u002Fnone","mxgrn",[104,297,34,248,79,34],[107,297,34,307,108,34],[136,297,39,312,137,34],"project\u002Fcritical\u002Fperformance",[314,297,35,315,79,34],"35507065","maker\u002Fneutral\u002Fperformance",[317,297,35,315,137,34],"35507179",[319,297,35,254,79,34],"35507458",[321,297,34,248,137,34],"35530577",[323,297,35,212,255,34],"35509555",[],[326,331,336,341,345,349],{"id":327,"name":328,"points":329,"category":330},"35543668","Phind",1401,"ai",{"id":332,"name":333,"points":334,"category":335},"35470915","Tabby",627,"dev_tools",{"id":337,"name":338,"points":339,"category":340},"35471129","BrainPlsWork",329,"productivity",{"id":342,"name":343,"points":344,"category":20},"35524328","OpenOwl",220,{"id":346,"name":347,"points":348,"category":335},"35483933","ChatGDB",189,{"id":350,"name":351,"points":352,"category":335},"35548778","twitter-api-client",183,13,false,"v2",{"id":357,"name":5,"line":6,"ai":354,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":358,"top":18,"kw":359,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":360,"url":9,"mix":361,"praise":101,"objection":123,"sub":21},35501718,0.09,[24,25,26,27,28],"3000030000003005333333051333550500013333",[32,33,34,35],1794036633808]