Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.
I've been home hosting a couple of game servers and NodeJS based websites/webapps for a while. Nginx in docker is acting as a reverse proxy, and I'm using docker containers and volume bind mounts for the applications too. Pretty much everything is either managing its own state in said volume mount, or using SQLite with the .db in a volume mount. Host OS is Ubuntu 16.04 on Hyper-V, with 8GB RAM allocated to it. There's more RAM available on the host if need be.

A friend is asking me to host a low but not zero load hobby Wordpress site now, which I've been intentionally avoiding.

Should I spin up an entirely new VM for isolating the Wordpress / Mysql to its own thing and just install them the traditional way as a service, or is Wordpress less toxic than I think and I can just throw in Wordpress and MySQL docker containers alongside my other stuff? I hear PHP is better now, but I'm still wary.

Adbot
ADBOT LOVES YOU

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Grump posted:

What's the pros/cons between:

1. Set up a bunch of domain names and 1 server, create A records under each domain name to point to the same IPv4, and have NGINX blocks figure out what domain name goes to what document root

2. Create a server with a pool of IPv6 addresses, create a bunch of domain names, and set up rDNS configurations so that different IPv6 addresses point to different websites on the same server, and have NGINX blocks that go to different document root.

Is the only different that each site will have a unique IPv6?

I've got one big con: A bunch of users, including both my employer who has more than 20,000 employees, and also my home setup do not have IPv6 support.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.
$3.50 a month gets you an AWS lightsail instance.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

i vomit kittens posted:

Is a $5 DigitalOcean droplet good enough to run a small React/Spring app that will be used by about 20-30 people at a time for signing in to events by entering a code a couple of times a week? And would I also be able to run a Postgres DB from that same droplet without issue or would I need to get another one going?

That should be completely ok. I’d be surprised if you need more.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

nem posted:

Lightsail is still poo poo performance from what I surveyed. IP reputation is quite bad on those machines too. You're better off sticking with Vultr; that's what I build out my platform releases on, completes in a hour. Lightsail was well north of double the time and CPU nearly a tenth.

This is pretty cool info, thanks. My expectations for super-cheap VPSes are pretty low, but it's interesting that Linode and Vultr appear to be less oversubscribed on CPU.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

CarForumPoster posted:

I have a very basic question I'm embarrassed to ask.

Why do people use REST APIs instead of querying the DB with SQL? Is there any reason to make an API in the below example?

I have 6 Django or Flask web apps running on AWS EBS or Heroku. There's 3 DBs between them all in RDS. For all of them, when I render pages I have the app query the DB to get whatever data I want and serve the data on the page with f-strings or .format() (except for authentication stuff which is abstracted by Django and I havent read into it).

Is there a reason I should do these functions by making a GET/POST to a REST API instead?

Calling some type of self-configured or managed API rather than calling the database directly allows much finer-grained access control, rate limiting, logging, abstracting away the backing database technologies, and more. It's also about letting different teams work on different tiers, and having the data available to multiple different consumers while avoiding having multiple applications query the database directly. It's also easier to make common mistakes that cause security vulnerabilities if you're free-handing SQL where you render pages.

Also, now that the trend is toward Javascript Single Page Apps that run & render entirely in the browser, and make calls to fill in the data and render the templates in the browser, you can't have the browser directly make SQL queries, so you have to build a REST API anyway for the browser to call and load data.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Incrediblastic posted:

Also - I'm already being bruteforced (I assume that's what it's called when random IPs keep connecting with attempts to login to random usernames/passwords) , is there anything I could do to prevent that,like blocking IPs?the IPs are random so i'm assuming a botnet so that won't help probably.

Fail2ban helps as mentioned, but if this is a pet server you can also reduce your drive-by login attempts massively by hosting SSH on a nonstandard port.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

CarForumPoster posted:

I went from Weebly -> Django on EBS+RDS -> Same Django on Lambda+RDS

Zappa is real good at making getting on Lambda with a Django site easy AF.

Can you share an example of a site running Django on Lambda? I'd worry that would make for a pretty slow site, but I guess the shared hosting we're comparing to is dog slow anyway.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

CarForumPoster posted:

Yea here’s a Django site deployed with Zappa on lambda (not mine). The button uses python requests to hit a gov API and then renders the response as a table.

https://f46tbhs8k6.execute-api.us-west-2.amazonaws.com/dev

It’s the fastest page I’ve ever tested on page speed:
https://ibb.co/fXJKRG1

I'm seeing ~400ms latency on the really empty landing page, and ~2.5 second latency on the table view. I've seen worse, but 3 second latency is exactly what I was worried about with lambdas actually having to render some HTML. Not awesome, but I'm also used to doing either SPAs that get delivered from a global CDN, or doing HTML rendering in Java or C#, which is a good whack faster than NodeJS/Python/PHP.

Its better than I thought, and rendering HTML in a Lambda seems to be a legitimate option, I had always written it off entirely before. That specific page seems fast because it just renders a single table, really simple HTML. I appreciate seeing the example, though!



Edit: Hitting it again made it way faster, I'm seeing about 350ms now. I got a cold start on that one I measured. Lambdas seem to be a legit option to do server-side rendering, cool.

Twerk from Home fucked around with this message at 14:54 on Oct 9, 2020

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

fletcher posted:

I've been leasing a dedicated server from Future Hosting. My ticket to the sales team went unanswered for months so I am getting a little nervous about the state of their business. That and they don't seem to be allowing anything else in Santa Clara so when my machine is EOL I am SOL.

As a result I'm shopping around for a new host for a dedicated server for some not mission critical stuff.

Looking for something with the following specs:
* 1 Gbps link, 10+ TB bandwidth per month allowed
* Located in California
* At least 24GB RAM
* Ideally at least 4 cores / 8 threads
* Min 256GB SSD & 2TB HDD

Currently I'm paying $125/mo for 24GB RAM, 540GB + 1TB HDDs, Xeon E5-2430v2, and 100 Mbps link with 10TB cap. Lack of SSD and 1 Gbps with currently solution is what has me shopping around.

Best I could find so far was with Colocation America:
* 1 Gbps, 15TB bandwidth
* Los Angeles data center
* 32GB RAM
* E3-1270v6 (fewer cores & smaller cache than I have now, but faster clock speed)
* 512GB SSD + 4TB HDD

They at least advertise on webhostingtalk so they can't be too bad. Any others I should look at?

Must it be CA? Is Oregon OK? OVH is bigger and less shady than the options you’re looking at. You can get 8x that hardware for the same price too.

https://us.ovhcloud.com/bare-metal/best-value/bv-2/

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Boba Pearl posted:

So I have light computer-toucher experience (I've done hell-desk for 4 years, but not much outside of that,) and I'm wanting to create a website to host my stories, drawings, and animatics that I've created. I need this because A.) Some of the content I create doesn't work in github after a certain file size, B.) The videos I make are worthless without the story surrounding them, and finally C.) I'm switching some of my stories from one forum to another, and want to have a place that isn't paywalled if people want to read my old content. (The CYOA forum here has like a 20 users max, less than 8 total read my stories and I want to move to a place that has hundreds of thousands of people registered to read these kind of stories. I want to reach a larger audience.)

I want to be able to keep my stories separate from each other, and maybe have custom or thematic backgrounds for each one, be able to have a next button that moves between posts on the stories, and be able to embed videos and images to the story as necessary. I'll probably just be copy pasting them off the forums to a google doc, and then using a program that transfer between google docs and html.

I want to host the images and videos I create in such a way, that I can post the on forums and the like and they would embed like normal.

I really don't see more than maybe 20 - 100 people using this, and even that is overwhelmingly optimistic, that being said I still would want a host that would make me re-do everything if I end up getting larger traffic than I had planned. I don't think I need a big-girl host like AWS or something, just a simple website host that'll easily let me format and post images, videos, and texts.

Do you have any recommendations?

It sounds like you're wanting to hand-create all your own HTML, and not use something like a Wordpress (or any other CMS) theme? Also, you're wanting to host your own video? If so, props, and this frees up a ton of options! I think that the easiest would be something like old school shared hosting ideally from a huge provider like OVH that I linked just there. Most of these shared hosting offerings sell CPU time that you don't need, and access to PHP and usually a MySQL database. What you're describingn really sounds like this plain simple "website hosting", so this is probably what you want. Most of these have been used for people to either do a Wordpress site, possibly with a custom theme, or do their own little PHP (or similar language) dynamic site.

For static (just plain HTML, JS, CSS) websites, there's also a lot of "static site" hosting options, like https://www.netlify.com/, Github as you mentioned, or setting up Amazon. A lot of the purpose-built static website hosting will have limits that prevent it from being used for video storage, so setting up AWS or another public cloud actually isn't a terrible option for this. Outgoing bandwidth on AWS is expensive though, and a terabyte of bandwidth would cost ~$90-100.

About that video hosting: this is the tricky part, video both takes up a lot of disk, and if you do get a high-traffic month, consumes a lot of bandwidth to serve. People normally dump video on Youtube, Vimeo, or someone else to host. It sounds like you're wanting to use this site as an image and video host to be posted in other places too. Consider what happens if somebody posts one of your videos on Reddit and you get 10,000x normal traffic. I'd actually say that the safest way to set up your own video host is to look for a Virtual Private Server, VPS offering. Unlike all of the options above, this would leave you in charge of taking care of a Linux VM somewhere in the world, which isn't a ton of maintenance but also is still more work and learning that you have to do.

It goes without saying that all of these options take more learning and fuss than Wix or Squarespace. Turnkey website builders are the way to go if you just want something up on the internet, but it sounds like you've already started down the path towards something pretty customized. I hope this helped!

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

teen phone cutie posted:

okay i know nobody answered my last question, but i have another one god damnit

last night i just tried out using object storage on my staging server for user avatars and icons that my site uses - all very small files (less than 200kB). when i deployed the code to upload the files to object storage and then read from it, the downloads were SOOOO slow. like 500ms to download a 150kB .jpg in the browser. what's the deal with that? is object storage just slow and i'm trying to use it for a use-case it wasn't designed for?

previously, i was uploading the files through SFTP and reading them from just normal file storage. it seems like it's faster, but i'd like to know if i should keep with this or was there something i was not understanding about object storage.

The Object Storage service I was using was Linode which uses s3 under the hood.

Object storage is a heck of lot higher latency than the disk of a server, whether real, virtual, on a SAN or whatever. Typically, when you're serving something from object storage to users browsers, you'll put a CDN in front of the object storage to cache things closer to users. Object storage latency is generally a bit better when your servers are hitting the object storage, because you're already in the providers network and there's probably even a connection open already. The expectation is still that you will cache things you need with low latency.

Linode doesn't use S3 under the hood, Linode built their own object storage which is S3 compatible, meaning that it implements some of the server API that S3 uses. The S3 API has become something of a standard that lots of solutions implement: https://min.io/

Re: Your performance question:

I would get more shared cores before I paid for dedicated cores instead. You will need to profile your site to figure out why it is slow, is this thing PHP? Is the database on the same box? What's your disk I/O situation looking like?

With Linodes pricing the way it is, I would look at the dedicated CPU cores as something you do at the point where you're unwilling to move up to the next tier of shared CPU pricing.

Adbot
ADBOT LOVES YOU

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

M_Gargantua posted:

Whats the Cost/Effort balance like for having an email server on a shared host vs. just using google workspace? I've been trying to get away from cloud based solutions and the whole google ecosystem for a while now.

Hosting your own email is consistently a giant pain in the rear end, and you're likely to have to troubleshoot deliverability problems even if you do everything right.

Your choices for hosted solutions range from the cloud giants to struggling companies with dim futures who I would not tie my boat to. If you specifically want to stay away from Google only, you can get email from Microsoft or even Amazon if you really want. The other big hosts that do email are companies like Rackspace, who I recommend you stay far, far away from.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply