Announcement

Collapse
No announcement yet.

Cloudflare Ditches Nginx For In-House, Rust-Written Pingora

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    Originally posted by curfew View Post
    At first you seem to portray Rust as something that is only beneficial with considerable added burden of maintenance, but then offer a real-world example of the complete opposite. NPM folks chose Rust because it made their life easier despite not providing more performance.
    I think you misread him. As I read his statement, the point was that the safety aspects of Rust enable you to make architectural decisions that you would not want to risk attempting in most other languages. "Fearless concurrency" is the slogan someone mentioned upstream, and indeed that was one of the design goals of Rust — to enable multi-threaded applications while protecting the developer from many of the usual pitfalls associated with multi-threading...

    Comment


    • #42
      Originally posted by cynic View Post

      I like Rust (as I like other languages) but I can't stand Rust fanboys that post such comment as your to every news.
      So, somebody is using Rust to do something? Nice! but there's no need to play victim pretending that Rust is the best language ever but everybody hates it.
      Hu? Were did I play victim? Were did I say Rust is the best language? Were did I say everybody hates it?
      You just made that up to have an argument.

      I was just anticipating the typical "rust is bad" trolls that usually come with all Rust articles here.

      Originally posted by lowflyer View Post
      Comments like the above actually make me want to re-write that stuff in C++ or C or even assembly
      Do it and than show us how much better your implementation is and that you're this great of a programmer to have no memory/threading bugs in your C/C++/ASM code.​
      If you can actually do that all in ASM you'll be my hero.

      Comment


      • #43
        Originally posted by Anux View Post
        Do it and than show us how much better your implementation is and that you're this great of a programmer to have no memory/threading bugs in your C/C++/ASM code.​
        If you can actually do that all in ASM you'll be my hero.
        Stakes too low. Make Rust disappear instead, and then a lot of people will.

        Comment


        • #44
          Originally posted by Anux View Post
          Hu? Were did I play victim? Were did I say Rust is the best language? Were did I say everybody hates it?
          You just made that up to have an argument.

          I was just anticipating the typical "rust is bad" trolls that usually come with all Rust articles here.
          LOL! exactly that!

          As you can see, nobody came here to say that "rust is bad". You're just victimizing yourself and complaining for something that didn't even happened!

          Comment


          • #45
            My guess is the primary advantage of this rewrite, that leads not only to performance improvements, is that they can express the business logic in native code, assuming that's what the end result looks like. You can always slap declarative configuration on top of a library, but making a traditional standalone server perform custom transformations and integrating with other code is quite painful. Most modern languages rely on embedded servers for implementing web applications anyway.

            Comment


            • #46
              Originally posted by cl333r View Post
              Good evening earthlings,
              Did I understand it correctly that the main reason it runs much faster is because it uses threads instead of processes?
              Yes but there's more...

              Originally posted by darkonix View Post

              It appears so, the new design using threads is not depending on Rust. The language is not the cause of the new design. That's a common misconception. Rust is safer, not faster nor slower than C.
              Did you see this part?

              Our Rust code runs more efficiently compared to our old Lua code. On top of that, there are also efficiency differences from their architectures. For example, in NGINX/OpenResty, when the Lua code wants to access an HTTP header, it has to read it from the NGINX C struct, allocate a Lua string and then copy it to the Lua string. Afterwards, Lua has to garbage-collect its new string as well. In Pingora, it would just be a direct string access.

              Comment


              • #47
                Originally posted by aksdb View Post

                Well, to some (big) extent, yes. However a few design decisions are influenced by what the language and framework offers. If all I have is OS-level-threads I can't simply design the system in a blocking manner and then try to spawn 100.000 threads to handle connections and other I/O bound stuff. If I have greenthreads/coroutines I could design the system in that way, though, because there I can have that many "threads" without much issues. Of course I can model my problem differently to fit into less threads, but then the properties of the language/framework directly influenced my design decision.
                In my experience it works backwards on business at least, first you get a team that will design the proper algorithmic flow/ design then you choose a set of language(s) from a pool based on cost(i don't mean money).

                * by cost i mean SLA, available tooling, in-house expertise, documentation/training availability, platform support, future availability, etc. etc.

                Your way is more for small teams and FOSS models but for business i'm not so sure. that been said i don't know the workflow on cloudfare and is not clear what process they used

                Comment


                • #48
                  I still have a blast seeing how people are still explaining how Rust is bad or not needed on every article that basically says "another high profile/impact project has adopted Rust".

                  Comment


                  • #49
                    Originally posted by cynic View Post
                    As you can see, nobody came here to say that "rust is bad". You're just victimizing yourself and complaining for something that didn't even happened!
                    Did you somehow miss cj.wijtmans and lowflyer? Also the thread has just started, be a little patient.
                    And you probably want to look up the meaning of victim.

                    Comment


                    • #50
                      Programming language drama is some of the dumbest drama.

                      Going from using nginx + lua scripts to a purpose built solution is going to be a huge boost almost without regard for what stack they used to develop it. nginx is a great piece of code and can give great performance for a huge variety of workloads but that doesn't translate to giving the best possible performance for a single task. The fact that they could lower their tcp connection establishments by a third is an easy example of how design

                      Rust is a fine language to choose for the task, it has some nice features around memory safety and threading that make this type of application easier to build well, and it sounds like they had the in-house skills to make it happen. Everybody and their dog will have their own opinion on how they would have handled it, but it sounds like CF is happy with their choice and that's really all that matters.

                      I'm a huge fan of modern languages and while Rust isn't my personal go-to I'm not going to pretend it isn't a top contender in the top echelon of high concurrency options.

                      Comment

                      Working...
                      X