Announcement

Collapse
No announcement yet.

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

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

  • #51
    Originally posted by piotrj3 View Post
    That is not reason Rust was created. In fact Rust doesn't have many things C++ does and it is intentionally not existing there (like exceptions). It is simply C/C++ that is memory safe that does every possible check on compile time.
    Do you understand irony?

    Comment


    • #52
      Originally posted by Anux View Post
      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.
      look, just choose a random news about a random topic CS related (being it an OS, a programming languge, a filesystem, a sort algorithm, a keyboard brand) and read a random forum on the whole internet: you'll 100% find some hater commenting it.

      it's not about rust, it is just the way it work in this field (and, btw, in almost any other human activity)

      Comment


      • #53
        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.
        Please do your part first: 1. make the code open source 2. Offer me a decent salary, I'm not willing to leave my 110K job just to prove a point to you.

        Comment


        • #54
          Originally posted by Anux View Post
          Did you somehow miss cj.wijtmans and lowflyer?
          If you want to imply that I somehow said "rust is bad", you're wrong. Did you miss my line I wrote earlier:

          Rust was created because the C camp wanted to have the C++ features without having to admit to actually using C++

          Comment


          • #55
            Originally posted by jrch2k8 View Post

            This is more "We don't wanna deal with modifying this huge general use codebase for our ultra specific purpose, let write something new optimized for our needs" more than a Rust specific thing.

            Sure Rust/Go/C++/whatever you like best can provide some benefits as a language but the big performance meat is from the design changes and how well it adjust to your hardware / use case. Hell they can prolly had used vala and still be faster than nginx for their specific use case.
            You're missing the point. Rust *enabled* those design changes.

            There's a damn good reason nginx spawns separate processes to handle connections: there's a huge risk of information leakage and separate process address spaces help mitigate that.

            With rust, the leakage they're afraid of is near-categorically impossible, thus they don't need to accept that overhead.

            Comment


            • #56
              Originally posted by cynic View Post
              ... you'll 100% find some hater commenting it.
              Yes, that's why I was able to anticipate it, what was your point again?

              Originally posted by lowflyer View Post
              Please do your part first: 1. make the code open source 2. Offer me a decent salary, I'm not willing to leave my 110K job just to prove a point to you.
              You wanted to prove something, not me.

              Originally posted by lowflyer View Post
              Did you miss my line I wrote earlier:​
              You told us that you have no clue why Rust was created, although it's easily researched in 1 min. on Wikipedia.​​ Damn who's paying you 110K? I should easily get 990K there.

              Comment


              • #57
                Originally posted by Developer12 View Post
                You're missing the point. Rust *enabled* those design changes.

                There's a damn good reason nginx spawns separate processes to handle connections: there's a huge risk of information leakage and separate process address spaces help mitigate that.

                With rust, the leakage they're afraid of is near-categorically impossible, thus they don't need to accept that overhead.
                1.) thread leaks are fixable on any language.
                2.) it have costs on any language.

                Rust just do it for you, so is less verbose and less error prone + certain automatic check that aren't free either.

                Also i don't care the language they used nor i hate they used rust, i was stating that the big 90%+ of the performance benefit don't come from the language but the design change because as always some rust evangelist was spouting crap on the first posts.

                And i maintain my position if you base your design on a language feature you should be fired(talking about a professional enterprise environment) on the spot, hence i believe first the design was approved and then rust was decided on because that feature fit the design paradigm and give it an edge over other languages specially since is an all new code base. that is all.

                right tool for the right job, evangelize a language is for idiots.

                Comment


                • #58
                  Originally posted by jrch2k8 View Post

                  1.) thread leaks are fixable on any language.
                  2.) it have costs on any language.

                  Rust just do it for you, so is less verbose and less error prone + certain automatic check that aren't free either.

                  Also i don't care the language they used nor i hate they used rust, i was stating that the big 90%+ of the performance benefit don't come from the language but the design change because as always some rust evangelist was spouting crap on the first posts.

                  And i maintain my position if you base your design on a language feature you should be fired(talking about a professional enterprise environment) on the spot, hence i believe first the design was approved and then rust was decided on because that feature fit the design paradigm and give it an edge over other languages specially since is an all new code base. that is all.

                  right tool for the right job, evangelize a language is for idiots.
                  "Wow! This software written in C is so much better at sorting numbers than the one written in assembly!"
                  "Yeah, it was easy really. It's so much easier to implement binary trees in C, where as in assembly it's hard to do better than an array."
                  "Thank god for better design patterns! Just be sure to keep being able to write things in assembly! Being dependent on one language's features is bad!"

                  Comment


                  • #59
                    Originally posted by Developer12 View Post

                    "Wow! This software written in C is so much better at sorting numbers than the one written in assembly!"
                    "Yeah, it was easy really. It's so much easier to implement binary trees in C, where as in assembly it's hard to do better than an array."
                    "Thank god for better design patterns! Just be sure to keep being able to write things in assembly! Being dependent on one language's features is bad!"
                    Patterns, tooling, language features, etc. are born from necessity most often than not because someone have to solve a problem the current tolling/languages/etc. cannot solve efficiently, aka they not born from thin air and then developers come like "ohh, nice this feature/language/tool just popped on my desktop now i can design this better". just in case you wondered.

                    Comment


                    • #60
                      Originally posted by Quackdoc View Post



                      I would say doing it in a memory safe way is critical, so the preformance improvement there is heavily implied
                      I think this is the major point people are missing. While most of the performance gain was due to a different architecture, making sure such an architecture is free of concurrency/memory/data race bugs is much easier in Rust than C.

                      This is what allows Rust to be faster in practice, its not that the language itself is 1on1 significantly faster than C but allows you to more easily create the most optimal program without having to worry about a certain class of bugs.

                      In fact a lot of programs written in C (including NGinx) have a per thread model basically because they don't want to deal with hard to debug concurrency bugs due to having shared data structures across different threads. In Rust, Go and JVM based languages like Java/Scala this is pretty much a non issue.

                      In C? Well good luck, especially if your business is not trivial.
                      Last edited by mdedetrich; 17 September 2022, 03:01 AM.

                      Comment

                      Working...
                      X