As they are Using Nginx already interested to know if they ruled out openresty or did not consider it.
I'm a big fan of Go and we use it internally, but I too wonder why nginx + Lua wouldn't be the chosen path. If it's good enough for Cloudflare it probably is good enough here. Besides, Varnish also would have excelled (yes I read the first post in the series) if they had just stored the configuration in a saner format and then output the required VCL when the config changed and reloaded on the fly. Both of the techno…
Choosing Go to implement the new GOV.UK router
31–40 of 98 posts
Re: Choosing Go to implement the new GOV.UK router
#32A lot of the comments here seem to be missing something quite important: Scala and Go are not similar languages. Scala is a large and complex language, encompassing multiple programming idioms. Teams programming Scala (as with C++ and many other "large" languages) often have difficulties nailing down what portion of the language they are going to use. "Java-without-semicolons" all the way through to idiomatic, functi…
Hell, some people like Perl! :p
Re: Choosing Go to implement the new GOV.UK router
#33Earlier quoted context omitted.
I'm a big fan of Go and we use it internally, but I too wonder why nginx + Lua wouldn't be the chosen path. If it's good enough for Cloudflare it probably is good enough here. Besides, Varnish also would have excelled (yes I read the first post in the series) if they had just stored the configuration in a saner format and then output the required VCL when the config changed and reloaded on the fly. Both of the techno…
Openresty and Lua are great, but Go is a more generally applicable language for building web services. So when taken in that context Go makes more sense if we look at it as a learning exercise as well as a new part of the stack.
Re: Choosing Go to implement the new GOV.UK router
#34Earlier quoted context omitted.
We did have some configuration - it was stored in Varnish and Nginx. The time cost of shipping new redirects when content is moved or new routing configuration for new tools coming online is non-negligible, particularly as we're in the middle of moving 300+ government agencies onto the GOV.UK platform. Also having all those redirects, friendly URLs, and application mappings in static configuration makes self-service…
They're incredibly easy to build. I notice you use puppet. That's enough tooling to push configuration out and restart services for nginx or apache+mod_proxy. You can break configuration out into separate files per agency if you need to. Varnish is different as that requires restarting. We do the same with commercial kit (Riverbed) with over 140 HTTP application endpoints and that is higher friction than the equivale…
Re: Choosing Go to implement the new GOV.UK router
#35 "Scala is great for performance, but quite bad at resource usage"
Maybe it's directly related to the next statement: "No-one in the core GOV.UK team had a deep knowledge of Scala, and particularly how the old router worked"
But the first statement, literally, does not make sense on its own.Re: Choosing Go to implement the new GOV.UK router
#36That seems weird to me: * No one having a deep knowledge of Scala is mentioned as a problem, but they will learn Go. * They rule out a language because of its syntax.
Re: Choosing Go to implement the new GOV.UK router
#37Earlier quoted context omitted.
It does not look that bad actually. Your list lacks Oracle, Microsoft technologies to really complain about inefficient usage of public money. I would love if my country used open source more.
Agree entirely there! However it doesn't excuse people working on a web site funded by the taxpayer using it as a technology playground.
Re: Choosing Go to implement the new GOV.UK router
#38A lot of the comments here seem to be missing something quite important: Scala and Go are not similar languages. Scala is a large and complex language, encompassing multiple programming idioms. Teams programming Scala (as with C++ and many other "large" languages) often have difficulties nailing down what portion of the language they are going to use. "Java-without-semicolons" all the way through to idiomatic, functi…
You're right, but i think the point you're missing (and i don't mean this in a rude way) is that they had a system built in scala, somehow, but now no one on the team knows scala. They lack an architectural oversight, that they should really be using one(ish) language rather than a big mix of languages so that this doesn't occur again when no one on the team knows GO because the project leads taken a new job.
A crappy PHP dev will learn Go a hell of a lot quicker than Scala, IMO. A safer choice, for their team and position, IMO.
Re: Choosing Go to implement the new GOV.UK router
#39Earlier quoted context omitted.
No but updating static routes via puppet/ansible and reloading is a piece of piss. If your site is volatile enough that the routing needs to change that often then there is something wrong either with your information architecture or your development process.
Or maybe you're trying to deal with a huge legacy content migration of several hundred different government agencies and want to deploy several times a day without waiting for 10 minutes for nginx to load 1MB of config each time?
Re: Choosing Go to implement the new GOV.UK router
#40Earlier quoted context omitted.
No but updating static routes via puppet/ansible and reloading is a piece of piss. If your site is volatile enough that the routing needs to change that often then there is something wrong either with your information architecture or your development process.
Or maybe you're trying to deal with a huge legacy content migration of several hundred different government agencies and want to deploy several times a day without waiting for 10 minutes for nginx to load 1MB of config each time?
1. take s01 out of pool.
2. migrate config on s01 to new config.
3. put s01 back in pool.
4. take s02 out of pool
5. migrate config on s02 to new config.
6. put s02 back in pool.
Ansible can handle this quite happily. Scales up to any number of boxes. For an (n-1)/n capacity reduction during deployment.
I've got a 450k apache config somewhere that takes Also if you have THAT much config, something is wrong with your information architecture (see my other points).