Web development with Go

270 views
Skip to first unread message

Paulo Júnior

unread,
Feb 3, 2022, 7:51:26 PM2/3/22
to golang-nuts
Hi all.

I hope you are well.

What are the main use cases for traditional web applications (I mean non-SPA) development with Go? In other words, in a world of Single Page Applications (SPA) and its frameworks (such as Angular, React, Vue, so on) where does Go have space?

Best regards.
Paulo.

merson...@actmedical.com.au

unread,
Feb 4, 2022, 7:05:18 PM2/4/22
to golang-nuts
Paulo

An important use case is when packaging your app in a container for deployment in Kubernetes or Google Cloud Run, for e.g..
Compared to an app written in Php where you have to package the framework code into the container, the same app
rewritten in Go reduces the size by a huge amount as the only thing you need to include in a scratch base image is the binary plus
some certificates.

Also, the memory requirement to run the app is much less.

One of my app's size was reduced from 600Mb(php) down to 20Mb(Go)!!
Also, memory requirement reduced from 1024Mb to 128Mb on Google Cloud Run, thus saving a lot of money!

Merson

Paulo Júnior

unread,
Feb 4, 2022, 7:33:53 PM2/4/22
to golang-nuts
Hi Merson.

What wonderful improvements.
Thanks a lot for your contribution.

Paulo.

Brian Candler

unread,
Feb 5, 2022, 4:11:49 AM2/5/22
to golang-nuts
On Saturday, 5 February 2022 at 00:05:18 UTC merson...@actmedical.com.au wrote:
the same app
rewritten in Go reduces the size by a huge amount as the only thing you need to include in a scratch base image is the binary plus
some certificates.

I wouldn't put certificates into a container image either, and definitely not the related private keys.  I'd store them as kubernetes Secrets and provide them to the container that way.  It reduces the exposure of the private keys, and allows certificates to be replaced without rebuilding the image - e.g. to deploy the same container in two different places.

merson...@actmedical.com.au

unread,
Feb 7, 2022, 2:54:38 AM2/7/22
to golang-nuts
Of course, Brian.
I meant the CA Certificates.
Merson

Amnon

unread,
Feb 8, 2022, 2:50:26 AM2/8/22
to golang-nuts
Applications whether single page or multiple pages do need to communicate with some sort 
of back-end to get their data and perform business logic. They need something to serve their AJAX requests.
And Go is a useful language for writing such  back-ends.

Reply all
Reply to author
Forward
0 new messages