We are on the same page! Excellent points.


On Mon 4 Feb, 2019, 4:49 PM Jesper Louis Andersen <
jesper.louis.ander...@gmail.com wrote:

> On Sat, Feb 2, 2019 at 1:37 AM Milind Thombre <thomb...@gmail.com> wrote:
>
>> Wow!
>>
>> Django is an order of magnitude slower than nodejs. Good to know these
>> numbers. Thanks for the link Shulhan! I don't see *go* in the list, which
>> framework does a typical go web app use?
>>
>>
> This can be important, but I too want to stress that this is but one
> factor of a system. Earlier, some of the tests in the techempower benchmark
> could outperform other tests by the omission of headers. In a hello world
> program, the HTTP body is small, so the header size is a serious
> optimization target. In a real system, where you move many kilobytes per
> request, chances are that compression/encoding speed is more important to
> optimize. Also, as you add more functionality to your system, which can be
> baked into other frameworks, then your numbers will start going down.
>
>> But they used a *hello world* program!
>>
>
> The obvious limitation of Node.js is twofold:
>
> * You have to work around cooperative concurrency. If a single event
> blocks the event handler, then both your throughput and latency can be
> severely hurt. A hello world style of program hides this. Go is
> preemptively scheduled, and even more so in later releases. This allows for
> far better latency responses, though at the expense of some throughput.
>
> * Node.js is not a priori parallel and thus doesn't utilize more than a
> single CPU core. Modern CPUs are many-core machines, NUMA, and requires
> more work in Node.js to utilize fully. In Go, this usage comes "for free"
> because it runs a web server per request in a goroutine.
>
> However, the hello program doesn't reflect any of these realities.
>
> My experience is that systems are often slow due to unforeseen
> consequences[0]. Modern software is complex and the bottlenecks can occur
> in all parts of the system. Said bottlenecks are not always due to the
> speed of the programming language, the HTTP server, the framework and so.
> Rather, modern software requires statistics and experimental analysis
> through the scientific method. This is also why telemetry, observability,
> instrumentation, dynamic tracing, and measurement have become key factors
> to good system design in the later years. And some of these have the
> potential to slow down the system. However, the benefit they bring allows
> further optimization.
>
> [0] Indeed, Test Lab C-33/a in the Black Mesa Research Facility style of
> problems often occur in software development.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to