-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking for a hoster for mnserver (serving matray) #1
Comments
Hi! As a die-hard manjaro user, I offer myself voluntary in order to host the service. However I have some questions, after reviewing the architecture of the system and so... AFAIK the mnserver parses the Manjaro RSS feed (And twitter feed??) and serve the news in some form of API to the clients (I havent dived in the code yet). So, wouldn't be more efficient to let the clients parse the Manjaro RSS feed directly? Or it its because it aggregates the twitter data also? Anyway, as I said, I am using Manjaro since very long time ago and I feel like contributing a little bit back to the community. |
Hi @iruizr7
There is two main reasons: The RSS feed is about 500 KB in size. If you have ~24 requests per second, each one receiving this amount of data, you will pretty quickly bring the forum server to it's knees. Also, there are several feeds that need to be consumed (mainly for ARM) based on what kind of news you want to retrieve (the different categories). In the worst case you'd need suck a couple of megabytes. As you mentioned there can be several sources (RSS, Twitter atm). Having a middle-ware makes it way more flexible to add feeds (even with different formats) in the future since you'd simply implement that into the service. You won't need to change the client (matray) at all regards, |
Hi, I'm currently in the process of setting up the project on a spare server I have. I'll wait for the DNS record to update and then report back here. Is there anything else I should keep in mind for running this service? |
Hi @moson-mo is there a possibility and if yes, does it make sense to run multiple smaller services like this one? Basically matray would fetch either random one from multiple sources and if that fails, take another one. regards, Luzi |
Sure, in theory that's possible. Now, I'm not going to put any additional work into matray myself to implement this, but if someone is willing to do so... Now 10 MBit/s is not really a lot though. The real bandwidth that is needed is more or less 1 MBit/s to be able serve 14k clients. |
Not really I guess. You might want to proxy it through nginx or so to add rate-limiting or TLS on top. (Mine runs naked though. Haven't had any problems with that...) |
For some reason Cloudflare isn't a fan of having this stuff work, http://70.34.197.142:10111/ works and responds with the news though. |
This service doesn't run on TempleOS 🤣 Just kidding. Looks good to me. |
Should be 4 cores with 2 gig of RAM if I recall correctly, more than enough for this small news server. |
Yeah. What about the network connection? 1 GBit/s I'd assume? I'll run some tests and hammer it a bit if you don't mind. |
Yes, it should be a 1gbit connection. Feel free to run whatever tests you want - let's hope it stays up :p |
Looks good to me. I couldn't kill it 😉 You are willing to run this for some time, right? If so, I'd suggest the following:
Would be good if you could git pull and rebuild mnserver. |
Hello there, 4 Cores I have a domain already pointing to the server since it's used for other stuff already. I could also set up a new standalone server (1C 1GiB RAM) just for this, no problem. Just give me a holler if you need another server and I'll set it up. |
Yes, I plan to run this for a long time. DNS should be fine now although mnserver is not available from the outside yet for some reason (probably something with the firewall? I'll take a look), the server itself is available at https://manjaro.rob.social now. I'll rebuild mnserver in a few minutes after I figure out why it's accessible via IP but not via the domain. |
Hmm, that DNS entry points to a couple of different IP-Addresses, but not the one you mentioned earlier. |
They all seem to be Cloudflare-controlled IP addresses. Do you think changing the port is a viable option? Cloudflare only seems to support proxying for certain ports (https://developers.cloudflare.com/fundamentals/get-started/reference/network-ports/) so I would prefer to go for a supported port like 2052. |
Ah, ok you have cloudflare running in front of it. edit: Just added the port number as a flag: 4f42437 btw. no clue how this behaves with caching and cloudflare. |
After some troubles with the go buildcache everything works as expected now: http://manjaro.rob.social:2082/news returns some news. |
Actually I just noticed I'm in a bit of dilemma here. How do I know you have good intentions and don't want to abuse it? You profile picture makes me nervous I must say. 🤣 |
Truth is you can't know, that's how the internet works. I offered to host the news server on a spare server because me (and a bunch of people at my company) use Manjaro and it would be sad to see a service go down. It makes no difference to me whether it's me or someone else from this thread hosting the server. Feel free to pick whoever you find most trustworthy - I just care about keeping this service alive and giving something back to the community. I'm also not sure how you would even abuse this kind of service (except for phishing or fake news?), I haven't looked at the code of the tray application but I would assume that you don't execute anything returned by the server. Please take your time before making this decision - my server will stay up regardless. |
@moson-mo are you going to change the matray config to point to manjaro.rob.social or keep manjaro.moson.eu and point that to y5's server? Additionally is it normal for it to fetch news on non-standard ports with no TLS? Does matray even support TLS? I like @FallenAngel666's idea of making this more of a shared responsibility and having more than one server in a rotation. I can donate a VM on my own dedicated hardware with 10 Gbit networking in the US. Given the extremely low resource requirements it is frankly ridiculous that the Manjaro team isn't helping out. |
Even if you rent a new small VM just for this server (which I did) it'll only run you a couple of dollars per month. Surprising not to see them jump in and host it honestly, I think someone else mentioned this on the forum discussion thread already. |
Would be also a good idea to put these two lines in the configs somewhere, so it's not hard coded. |
To some people, it is maybe also concerning to use Cloudflare under EU privacy law and in some open source communities. Especially when this happens automatically. There could be tracking etc. |
To weight in about multiple servers - I can also provide a zero analytics load balancer on my VPS services that will route to different mnserver servers. This would allow us to use only one domain - I could even order one if needed. |
Given the request is sent over plain HTTP (checked my own matray config to confirm), I think the fact @y5's is proxied by Cloudflare is the least of your worries! I get the concern and I think one thing that might open up a can of worms is Cloudflare's analytics. I would encourage y5 to not use Cloudflare as I really don't see what benefit it'd provide in this case for such a simple service. |
Then we're back to the initial issue (not an issue, just a thought though), we need10Mbit/s Server with high availability. |
I totally agree! We also are drifting to offtopic here... sorry. The goal is: find someone who is willing to host the server as is. Best option without CloudFlare if it wasn'
|
Then I'll write again what I said in my first post. Signing off for today. Its 8pm in Germany. |
Cloudflare does not proxy requests for my server, it is merely a DNS provider at the moment. |
@Sommerwiesel Can you send me a PM at the Manjaro forum? |
I'd be changing the URL on the client side. (I'm totally against forcefully changing users config settings, but in this case it makes sense). It (manjaro.moson.eu) still refers to a server that runs a manjaro mirror atm, but I also want to get rid of that subdomain at some point. So the successor should have it's own domain...
Tha's just the appid, not a URL or anything.
No, while it's not a big deal to implement in mnserver itself, I'd simply reverse proxy it with nginx doing the TLS termination... |
Woa! It seems that we have more voluntaries than I initally thought! That's nice! FOSS power! Anyway, I am curious why you think 24 hits/s with 500K size, summing to 12MB/s, represents a challenge, even for the most ridiculous server. I doubt Manjaro would be hosting the forum in a Raspberry Pi... Heck, even the Rpi3/4 would bear that load without sweating. And that feed would seriously benefit from some basic caching, so, basically serving static content! Maybe I am missing something or presuming so much about the core Manjaro Team. As I said, I am using Manjaro for a long time, but never had taken the leap to help (Don't know where I could do it best, tbh), maybe the are much greater resource-constrained that I thought. So, maybe this serves me as a stepping-stone. There are better servers here, offered, than mine, which was simply a little space at my ARM cluster at home. But if you could point me to some other needed work at Manjaro, I could provide some synergies. Greetings everyone! |
The bandwidth itself is probably not an issue. |
That's still about 30 TB per month (I think?) spent on just downloading that RSS feed over and over. It'd be one thing if it was cached on disk, but almost inevitably Discourse is doing some processing with each request and would likely get significantly bogged down regenerating the RSS feed over and over. Plus the tray app is configured to phone in every 10 minutes and would consume about 72 MB of the user's Internet data per day if it directly polled that RSS feed. |
Big thanks to @Sommerwiesel. He will take over hosting of the service. |
On one update I saw that manjaro has its own RSS feed... I found link, we should investigate how to use it for matray: |
The mnserver fetches these RSS feeds, caches them (for 10 mins), then breaks them down into a significantly simplified JSON payload that only includes exactly what matray needs to display news items. So matray is using these RSS feeds in a roundabout fashion and mnserver is saving the project and end users a significant amount of bandwidth as the current settings are set to poll for an update every 10 minutes. If matray polled every 24 hours instead, for instance, it could perhaps use the RSS feeds. Doing so would probably require a major re-architecture of the application and given the author has moved on and only committed to maintenance, that ain't happening. |
Since I'm shutting down my instance of mnserver on manjaro.moson.eu and Manjaro is not willing to host this service, I'm looking for volunteers in the community.
The service is currently being utilized by about 14.000 (concurrent) matray users.
Min. Requirements:
The server should be running 24/7 with high availability and a stable internet connection.
Some stats:
Install instructions:
Note that the systemd unit file is set up with
User=www-data
.Change this according to your setup... (if you have for example nginx installed, this user account should exist already)
The service listens on port 10111.
You can easily test it with curl:
The text was updated successfully, but these errors were encountered: