skip to Main Content

I am kinda old school and the first programming language for web I saw was PHP, and everybody uses it with Apache. At that time, I also knew ASP, which were used along with Microsoft IIS and, later, ASP.NET, that runs over IIS, as well.

The time passed, I went to the ERP world and, when I came back (few months ago), I knew Golang and Node.js and for my surprise they have their own web servers.

I can see many advantages in the builtin web servers, but, every application needs to rewrite their web server rules (I faced that recently when I needed to setup a HTTPS server using Express.js).

After some hard work to understand all the nuances of the HTTP protocol, I asked myself: and if I am doing it in the wrong way? If all the permissive rules that I created in my dev server go to production? Maybe this is an useless concern. But maybe I am creating a fragile server that could be exploited by a naive hacker.

Using a server like Apache it is harder to misuse security rules, because there are settings for development and production environments that are explicit. If the rules are hardcoded (as they are in Node or Go), an unaware developer can use development rules in production and nobody is going to see it before the stuff happens.

Any thoughts?

3

Answers


  1. You can still use nginx or apache in front of your golang gateway for many reasons including tls termination.

    But service to service communication might be nice to communicate directly to services and the golang http webserver is fast. It also supports http2 out of the box. Go leverages its “goroutines” to reduce overhead from the os to handle many requests at once.

    Login or Signup to reply.
  2. web server focuses on the speed capacity and the caculating capacity. No matter how good java or php web is or how many old companies put them in use, as long as a new language can provides a faster speed and better capacity such as go, more programmer would go for it.

    by the way, to run a web server in go is really such an easy thing.It’s faster building and slightly running.And the routine in go helps the web server beter serves milions of client requests,Which old web language can hardly do it.

    Login or Signup to reply.
  3. Node.js and Golang do not have their web server, these are just some lib packages implement http-protocols and open some ports to provide services.

    Like Spring web.

    Nginx/IIS/Apache are true server, web server just a component of them.

    I think Spring should meet the full application scenarios, include /gateway/security/route/package/runtime manage/ and so on.

    But when we has some different language platform, then we need nginx/apache/spring gateway/zuul/or others to route them.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search