8 ms·
We Built Our Own DNS Infrastructure
- nreece 5y agoCurious to know if anyone's hosting real-world production web apps or APIs on replit, or is it mainly an educational platform?
- remram 5y agoIt's marketed as an IDE so hopefully not (I'm not sure you even could?)
- amasad 5y agoOur marketing so embarrassingly out-of-date right now but yes we have a very robust hosting offering. It's still meant for side-projects and maybe early-stage startups. I wrote something on what it feels like to host an app from your editor: https://amasad.me/hosting https://amasad.me/hosting
- remram 5y agoUnfortunately my experience of replit (is that the correct spelling now?) is that it doesn't work, even for development. I have the simplest create-react-app project [1], and not only does it take 10min to npm install, it then doesn't start (runs out of memory, gets killed). I know frontend development is in a bit of a weird place right now, but if it doesn't work for this... I last tried it 8 months ago but I get the same thing now. If it takes seconds on GitHub's free CI and fails after 10min on your platform, then I really can't use it. The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process. [1]: https://github.com/remram44/twitch-vod-sync https://github.com/remram44/twitch-vod-sync
- amasad 5y agoCreate React App is a crime against computers. It's an absolute resource hog, which maybe is okay for Facebook engineers with $3000 MacBooks, but we can't give that much resources to free users. To use React on Replit you should use Vite. We were on HN just yesterday talking about it, it's an absolute delight: https://news.ycombinator.com/item?id=26972400 https://news.ycombinator.com/item?id=26972400 If you really want to use CRA on Replit, you should buy the hacker plan for $7/month which also lets you boost select repls and it will then be very usable for you: https://blog.replit.com/boosts https://blog.replit.com/boosts
- edoceo 5y agoI lol-ed and also like your frank answer. well done.
- remram 5y agoI guess my real point is that common workloads that work for everyone don't work on your development environment. I could pay for a bigger environment from you, but really this does not make me want to move any workflow to your platform (especially not production deployments!). Sure, I can try and sell a whole different tool to my team, or accept that they just want to get things done and keep using the current tool that works everywhere but on replit. I get where you're coming from, and I might take your advice next time I have to do something frontend-related (which hopefully I won't), but also understand that this works fine on most other tools' free tiers. In fact it builds from scratch and publishes to GitHub pages in 50s in GitHub Actions.
- thrwaeasddsaf 5y agoThat's a world where megacorps and VC-funded fartups are the only thing left, and they can give you lucrative free tires because either they're FU big or they're just burning VC money to lock you in and eventually sell your data or extort the money from you once they've become dominant on the market. I get where you're coming from; you just want free stuff. Understandable. But also understand that there are people who want to operate and support different kinds of businesses. For example, we might pay a few dollars a month for someone to host a git repo: https://sourcehut.org/pricing/ https://sourcehut.org/pricing/ Offering service actually costs money, and it has to come from somewhere.
- nreece 5y agoMarketing and positioning definitely needs a push towards robust and scalable hosting. Integrated environments (browser IDE + CI/CD + serverless hosting) are going to be big for starter apps and quick APIs. I spent some time reviewing Google Cloud Shell Editor, which has git support (not GitHub yet I guess) and one-click build & deployment to Google Cloud Run, which overall is a powerful integrated environment in itself. Imo, replit should preemptively focus on improving and highlighting hosting.
- amasad 5y agoYou're right -- thanks for the feedback.
- indigodaddy 5y agoVery cool! So, would it be achievable to use Repl to both host and create (eg sort of as a web/code based cms) posts for a Jekyll (or some other ssg) blog, but/and also have the content be git-integrated? Would I just use a guide like this?: https://replit.com/talk/learn/GUIDE-MAKE-A-BLOG-USING-JEKYLL-POG-ALERT-KEK/59021 https://replit.com/talk/learn/GUIDE-MAKE-A-BLOG-USING-JEKYLL...
- amasad 5y agoSome companies host bots, internal tools, and increasingly micro-services. But primarily side-projects and increasingly early-stage startups (e.g. https://blog.replit.com/blubbr https://blog.replit.com/blubbr). One fresh thing is plenty of developers in India are hosting covid support apps on Replit. This particular app has done 1m+ hits in the past 24 hours: https://covid.army/ https://covid.army/ You can add __repl after any app to get the source: https://covid.army/__repl https://covid.army/__repl
- mraza007 5y agoThis is so cool. I love how Repl.it is making a positive impact by empowering the developers.
- deleted 5y ago[deleted]
- sivakon 5y agoHow is this different from glitch.me? I am genuinely curious. Looks like a static Next.js app. I am a regular replit user, I want to know if the support of node/deno is complete (it hasn't been really responsive so far).
- amasad 5y agoIt’s better, more robust, faster, and more flexible. Bigger user base and network of creators and apps to draw on. Node support is A* and deno is still experimental.
- nreece 5y agoSpeaking of runtime support, any reason why C# is using Mono instead of official cross-platform .NET Core 3.x or the latest .NET 5, and it also looks like ASP.NET is unsupported. Any plans to address these in the near future?
- tmlb 5y agoThe article mentioned that the blog itself is hosted on a replit, so I guess that's one example. This seems like it would be great for rapid prototyping.
- zanchey 5y agoI wonder about the trade-offs in writing a completely new server compared to a backend for BIND or PowerDNS.
- tptacek 5y agoStraightforward authority servers like these are very easy to write, in memory-safe languages. It might actually take longer to figure out how to get a BIND configuration doing what Replit does here, but even if it didn't, the resulting server is much safer than BIND, and does exactly and only what you want it to do. I think: a pretty easy engineering decision.
- nexuist 5y agoTo add on to this, DNS is meant to be a simple protocol. The problems we encounter with it today are usually due to the thousands of little patches added on through the decades to tack functionality onto what is essentially supposed to be a key-value store.
- deleted 5y ago[deleted]
- tialaramex 5y agoI don't disagree overall that a competent team really could get this right in the same time it'd take to make it work how you wanted with BIND, but although DNS is simple there are some corner cases where an incorrect solution will appear to work in trivial scenarios - "It worked in my Chrome" but may have either functional problems or security problems. For example the 0x20 trick. The specification for DNS is clear that you aren't supposed to care about bit 0x20 in labels. ClOWnS and cLowNs and clowns and CLOWNS are all the same label as far as DNS is concerned. However your answers need to bit-for-bit match the question you were asked. So if you answer "ClOWns A?" with "CLOWNS A 10.20.30.40" that's a mistake, you were asked about "ClOWns" not "CLOWNS". In 1995 if your DNS server got this wrong nothing of consequence breaks. But in 2021 if you get this wrong some important things magically don't work. The transaction IDs that should make forging DNS answers hard are very short, and so to beef that up slightly some stacks will hide more bits in the 0x20 bit of labels where they will be echo'd back by a compliant implementation. But to reap this reward they must ignore answers that get the 0x20 bits wrong, like yours. I feel like if "You can't get this wrong" (a stronger claim that you admittedly didn't make) was true, my visits to the Let's Encrypt community site wouldn't all begin by ignoring the people whose problem is obviously just that their DNS server doesn't work properly. Some of them have problems an authority server doesn't care about, but lots of them have dumb problems you'd imagine are impossible and yet apparently people have successfully sold commercial DNS servers with those problems.
- anurag 5y agoInteresting! How do you handle apex custom domains with registrars that require an A record?
- cbrewster 5y agoHey anurag, big fan of Render! We currently don't have a great solution for this and we recommend that users use a DNS provider that has support for something like an ALIAS record.
- anurag 5y ago> Hey anurag, big fan of Render! Thanks Connor! Did you consider creating CNAME records with your existing DNS provider to point to the target cluster proxy for each repl.co subdomain?
- cbrewster 5y agoGood question! One of the motivations for splitting our infrastructure into clusters was to separate paying and non-paying customer. There's various reason for this, reducing the size of our failure domains and running better hardware for paying customers. However, this means users can be transitioned between clusters as they become a paying customer or back to a non-paying customer. Since repl.co subdomains are tied to the user/repl and not to the particular back-end cluster, we'd have to maintain way too many records with our existing DNS provider. Even if we could, we'd need to make sure the records are always synchronized. In the end, it made more since to roll our own authority server that can just query our data store and generate the right DNS answers on the fly.
- anurag 5y agoMakes sense. Thanks for the article and explanation.
- leetrout 5y ago> We automatically detect the web server and open a webview in the workspace And you have to use one of their package buttons to make that happen. Super frustrating that they don’t just have an button to open a web view on a port.
- cbrewster 5y agoI'm not sure what you're referring to. You can use any web server library/framework you'd like, we open the web view whenever your program starts listening on a port. We can't open the web view any earlier since there would be nothing to load in the web view.
- karmakaze 5y agoA good case of situational pragmatic wisdom > common wisdom.
- ddddd1 5y agoA good case of situational psychosis widow > common widow.
- vinay_ys 5y agoI did exactly this 15 years ago. I was a C++ developer and there was no golang around yet. And Bind had fresh security bugs every month. So the easiest and safest thing I could do was use djbdns (tinydns) with its cdb files being recompiled whenever records had to be added or updated.
- tptacek 5y agoCDB was also (by design) a far nicer programming interface than zone files, which are archaic.
- tluyben2 5y agoI have been working on this for a bit as well but did not figure it out completely yet (mostly due to lack of time): I want to create enough to have loadbalancing/failover on dns level (like cloudflare/route53). Any tips? Open source and on premise hosted.
- deleted 5y ago[deleted]
- saurik 5y agoThe usual implementation is you simply check every few minutes which nodes are up and then in your A response you return all the working addresses.... are you trying to do something more complex?