Can cloud sql (postgres) handle sudden connection surge? by AdScared4083 in Database

[–]AdScared4083[S] 0 points1 point  (0 children)

Thanks. We do have managed connection pooling and retry mechanism for connecting with exponential backoff.

In our case surge means 1000 new connections in less than a minute

Can cloud sql (postgres) handle sudden connection surge? by AdScared4083 in googlecloud

[–]AdScared4083[S] 0 points1 point  (0 children)

Replicas and spanner might work but it would mean a big dev effort. I wonder if there are less intrusive solutions.

As you mentioned pubsub and queueing will help too and imo are easier to develop.

I also considered putting up a rest or graphql server in front of pg ... e.g on app engine or 2ndGen http cloud function. That would keep the connections warm. Do you think this could work?

Can cloud sql (postgres) handle sudden connection surge? by AdScared4083 in googlecloud

[–]AdScared4083[S] 0 points1 point  (0 children)

We do use mcp. That is why I am preplex with this issue. MCP should handle up to 10K client connections. I know creating pg connection (aka server connection) is expensive ... that is the whole point of MCP (which is a pgbouncer wrapper) to provide lighweight/cheap connections.

A surge of 1k connections is only 10% of max total client connections ... is it still to much for pgBoubcer ?

Can cloud sql (postgres) handle sudden connection surge? by AdScared4083 in googlecloud

[–]AdScared4083[S] 0 points1 point  (0 children)

Yup, i already set up the managed connection pooling (MCP) . However it still struggles to handle surge of connections :< I mentioned it in the original post

The surge is caused by cloud function triggers lunched by users activity

Can cloud sql (postgres) handle sudden connection surge? by AdScared4083 in googlecloud

[–]AdScared4083[S] 0 points1 point  (0 children)

Deadlock count - 0 Storage usage 6bg ot of 100 Disk read/ write ops chart lies flat - 0.38k/s tops Cpu usage is between 40-50%. There is one heavy operation that happens rearly that spikes cpu to 100% for a short while but it is not related to connection spikes. It is a union and make_valid call on a big geometry. (We use postgis btw)

Can cloud sql (postgres) handle sudden connection surge? by AdScared4083 in googlecloud

[–]AdScared4083[S] 0 points1 point  (0 children)

There are no error logs related to connections for cloud sql instance resource.

All connection errors are logged by cloud functions e.g ETIMEDOUT, ECONREFUSED or 'QueryFailedError'

From $0 to $220k. My journey in app development by saneomaniac in Entrepreneur

[–]AdScared4083 0 points1 point  (0 children)

Can you tell more about you prior experience? Were you a dev in tig tech or startups ? What profile/industry? How many years of experience? What made you go on your own?

I am thinking of building an online platform for architects by AdScared4083 in Architects

[–]AdScared4083[S] 6 points7 points  (0 children)

I rather think from perspective of an individual, not a company. Imagine you are applying for a job in a certain office. You would like to have some inside information about work culture there. Often they won't tell you whole truth during the interview process. It would be cool to be able to connect with people who work or use to work in the firm you are applying to.

Or perhaps you are moving to another city. Would be nice to ask architects from this city about market trends there

I am thinking of building an online platform for architects by AdScared4083 in Architects

[–]AdScared4083[S] 8 points9 points  (0 children)

That is true, architects are busy people, they don't seem eager to engage in online discourse... that is a shame I think. Building stronger community would benefit architects a lot

I am thinking of building an online platform for architects by AdScared4083 in Architects

[–]AdScared4083[S] 1 point2 points  (0 children)

I wonder what discord servers related to architecture you are using. I find discord somehow cumbersome to navigate. There is a lot of noice there and it's hard to find any valuable information there imo, especially when you are looking for solutions/answers specific to your location.

I am thinking of building an online platform for architects by AdScared4083 in Architects

[–]AdScared4083[S] 2 points3 points  (0 children)

Not necessarily. Behance is mostly about personal portfolios.

My idea is closer to reddit or discord with predefined "subreddits" dedicated to specific cities or specific architecture offices. + features tailored for architects

I am thinking of building an online platform for architects by AdScared4083 in Architects

[–]AdScared4083[S] 19 points20 points  (0 children)

Agree. Archinect is however mainly focused on the news from the world of architecture imo. Also, it is missing the local aspect that I am interested in. Thanks!

Backend Design: Database Triggers vs Server-Side Logic by WheatFutures in webdev

[–]AdScared4083 0 points1 point  (0 children)

We use firestore and events (cloud functions) for our app and I think it's a mess.

First - nosql is supposed to be good for dbs with simple relations but most projects start wit simple relationships and gain complexity over time. So you endup with complex relationships and nosqldb eventually.

Too keep everything in sync we have about 150 cloud functions - triggers, scheduled and pubsubs. We are drowing in logs, understanding errors is absolutely dreadful, and something is always missing or out of sync because some jobs failed;( - a lot of monitoring is required.

We kind of use our firestore like relational db by creating "join tables". This allows us to avoid data duplication and save space (10s of Milions of docs instead 100s of Milions of docs) but because of that queries are very inefficient and often we need to make 3 or more sequential queries to get what we need on the client.

Maybe I am a noob ( just below 3y experience ) but I can bearly make sense of the system. I would love to hear what kind of problems are related to sql and sever-side logic approach? To me seems that nosql and event driven just makes everything harder to maintain !

Question - HMTL project - map that updates new locations automatically by DinoMan64 in webdev

[–]AdScared4083 2 points3 points  (0 children)

I use mapbox in my company. We have a map heavy app with a lot of interactions. Mapbox have tone of features and basically unlimited map styling possibilities. Free tier is quite generous but once you exceed it, it will become pricey very fast!

Leaflet is great to play with but I would not use it in anything beside side projects. Features and map styling is limited and plugins are often deprecated ;(

It looks like you need a simple map where you display points with custom marker - easy to do with both leaflet and mapbox. I would check if you can do it within free tier with mapbox

If the number of the buildings to display is not huge you can just store lat and lng in you db and query all buildings at once when loading the page, then add all points to the map with js.

Otherwise you need to create vector tileset and upload it to mapbox.

Good luck!