Hey everyone,

It's the time of year to renew most of our servers, so I'm in the process of making a few updates, tweaks and tests to keep things running smoothly, while trying to keep our costs down. We've been hosted on Amazon for years, and we'll continue to stay there.

  1. I'll likely be moving the site to a different availability zone with better support for different instance types and newer hardware. I moved the web servers for SteamTrades today, the SteamTrades database server will move tomorrow along with the SteamGifts web servers, and then the SteamGifts database server will follow. This could result in some downtime while moving the database server, but I'll know better in the next couple of days.

  2. I'm switching to newer load balancers with a few improvements and HTTP/2.0 support. This means I'm changing the A records for the domains. This shouldn't affect you because your internet provider will likely start sending you to the new load balancers within minutes of the change. However, I'll keep the previous load balancers online for 48 hours in case anyone has an ISP with a long delay. If you notice issues viewing the site a few days from now, this could be the reason.

  3. I'll be testing some different servers for our database with AMD processors and measuring performance to ensure they're comparable to our existing setup. This could result in minor downtime while moving to different hardware (15 minutes) and some slower page views for a small period of time as the database server rebuilds the cache.

  4. Add-on Creators: I'm going to setup our web servers to only serve gzipped data. SteamTrades starting now, and SteamGifts starting tomorrow. A high amount of our traffic comes from various user add-ons and scripts, and reasonably priced bandwidth is not a strong point with Amazon. If your add-on already scraps our data with gzip support, you won't have an issue. If it doesn't, then you'll likely just need to add one line of code to your script to decompress the data.

That covers most of the major changes, and if all goes well, you won't notice a thing. Nonetheless, if you experience any issues during the next week, please let me know.

5 years ago*

Comment has been collapsed.

Ah yes I understood all that perfectly

5 years ago
Permalink

Comment has been collapsed.

Yes, he's connecting the doohickey to the bibs and bobs, not to the Infinite Improbability Drive though, that would ludicrous.

5 years ago
Permalink

Comment has been collapsed.

5 years ago
Permalink

Comment has been collapsed.

He connected the muffled doohickey to the flex array.

5 years ago
Permalink

Comment has been collapsed.

Also, someone really needs to lock down the starboard power coupling.

5 years ago
Permalink

Comment has been collapsed.

Is there any plan to release a public API? Fetching JSON will be lighter and easier to manipulate than loading full HTML page.

5 years ago
Permalink

Comment has been collapsed.

A high amount of our traffic comes from various user add-ons and scripts

Which could be greatly reduced by providing a proper API for uncritical public data (like for the bundled-games-list, giving an equivalent no-cv list (which is still completely missing), user-/group giveaway-listings and so on)

5 years ago
Permalink

Comment has been collapsed.

ISP's with long delay's should take you as an example, and renew their services....

http://www.speedtest.net/result/7847888851

having these kinds of internet speeds, is sooooo annoying when the rest of the world has a hard time catching on...

5 years ago
Permalink

Comment has been collapsed.

5 years ago
Permalink

Comment has been collapsed.

Speedtest?

View attached image.
5 years ago
Permalink

Comment has been collapsed.

very nice :)

5 years ago
Permalink

Comment has been collapsed.

just to bad,, the one you posted is from 2017.... ; is it even yours ?

5 years ago
Permalink

Comment has been collapsed.

Quiet you

Current isn't nearly so nice

5 years ago
Permalink

Comment has been collapsed.

Speedtest!

View attached image.
5 years ago
Permalink

Comment has been collapsed.

i laugh, cause things can't be worst.

http://www.speedtest.net/de/result/7882954970

5 years ago
Permalink

Comment has been collapsed.

you are still better of as most parts of the world....
ive seen a lot worse....

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago
Permalink

Comment has been collapsed.

but when was that?

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago
Permalink

Comment has been collapsed.

Old spiders know all the nice tricks though!
XD

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago*
Permalink

Comment has been collapsed.

Dude. Dude. DUUUUUUUUUDE.
Of course i didn't.
xD

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago
Permalink

Comment has been collapsed.

You didn't offend me though. I can understand the problems of this kind of humor very well cause i have it too.
My humor and the Monty Python movies have helped for many awkward situations in my life...
Your place in my <3 list still stands. (Crappy gifts but that is all that i can provide :( )

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago*
Permalink

Comment has been collapsed.

By the way, you missed the original joke. You wrote "our server load way back when," when you wanted to write then apparently.

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago
Permalink

Comment has been collapsed.

Why stop here... I had to look up expat Definitions :)

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago
Permalink

Comment has been collapsed.

Well i am not a native speaker so i missed the original meaning.
Remember way back when?
Pepperidge farm remembers.

5 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 11 months ago.

5 years ago
Permalink

Comment has been collapsed.

High bump!

5 years ago
Permalink

Comment has been collapsed.

Another Definitions link just because :)

5 years ago
Permalink

Comment has been collapsed.

That is very informative! Thank you!

5 years ago
Permalink

Comment has been collapsed.

the TIL's everyday I tells ya

5 years ago
Permalink

Comment has been collapsed.

View attached image.
5 years ago
Permalink

Comment has been collapsed.

View attached image.
5 years ago
Permalink

Comment has been collapsed.

Thanks for keeping us informed about infrastructure changes, it's not a usual thing to do and it's greatly appreciated.

SGTools already uses gzipped data for SG parsing and frankly there is no reason for other scripts to not support it, since it's trivial and heavily reduces the amount of bandwidth used. Forcing only gzipped responses is perfect in my opinion.

To reduce even more bandwidth, and it as already been suggested several times though those last years and a couple of times in this thread already, an API with public information in json would be perfect.
Scripts would need to do far less petitions, they response would be smaller and you could fine control the amount of petitions that each script or site is doing.

5 years ago
Permalink

Comment has been collapsed.

A high amount of our traffic comes from various user add-ons and scripts, and reasonably priced bandwidth is not a strong point with Amazon.

We've been asking for API access for years now, no script would need to put pressure on the site and force SG server to render it if it had better way to access the required data. If your motivation is truly cutting the traffic that comes as a result of userscripts, please consider providing an API way to access SG data - this will not just cut the bandwidth being wasted as a result of site render, it'll also put less pressure on SG servers.

It doesn't have to be anything fancy or huge, you can start small with what generates the most traffic, which probably is a giveaway itself. For instance, here is the data that I'm making use of in ArchiBoT that could be available as /Api/Giveaway/ABCDE instead:

bool Bundled // is the game bundled? it'd probably make more sense to use something like RealCV percentage that could be set at 100, 15 and 0 respectively for unbundled, bundled and free
bool CanJoin // Is the account eligible for joining this giveaway? If API assumes no account-based access, this can be removed
DateTime CreatedAt
ulong CreatorID
DateTime EndsAt
HashSet<ulong> Entries
HashSet<SteamGroup> Groups // If SteamgiftsType includes groups, just ID of the group as seen on Steam would be enough for me
byte Points
byte RequiredLevel
EStatus Status // e.g. Begins, Running, Ended
SteamGame SteamGame // Some basic data about game like its ID (appID/subID) and type (app, sub, custom for gift cards etc)
ESteamgiftsType SteamgiftsType // Public, invite-only, group, wishlist?
Dictionary<ulong, bool> Winners // Map that maps steamIDs of the winners to a bool "received" value

Stuff that can't be easily requested (e.g. due to expensive SQL calls) could be further separated from general giveaway info, for example /Api/Giveaway/ABCDE/Winners and /Api/Giveaway/ABCDE/Entries. There is a lot of possibilities how you want to design your APIs in the most efficient and natural way in regards to your database, and regardless what you stick with, the improvements will be huge.

If you have concerns in terms of who should be permitted to access the API and what info it should expose, I don't see anything against linking API to the user's account, similar to how Steam is doing that. Afterwards you can easily impose any limits you want, for example inability to request giveaway data from creators that have blacklisted you (or you blacklisted them).

In any case thanks for keeping us informed. I doubt enforcing gzip will help much because all modern browsers and tools should already prefer to ask for gzipped content by definition, while everything that doesn't most likely do not support it to begin with, so you'll most likely cut old browsers, tools and scripts and do not affect majority of users and usages, with a very small fraction being in-between of those two where forcing gzip will actually make web browser ask for it while it didn't do that before.

5 years ago*
Permalink

Comment has been collapsed.

I see what you want to say, but you should be aware that its more likely that cg is out of resources for something like that, then not willing. Especially if it will cut the costs in the long run.
But than again, if we have quite nice community right here, maybe cg could share reasons why is unable, so we might help it out, or if he is just not willing, or maybe there is some other reason that we are not really aware of.

5 years ago
Permalink

Comment has been collapsed.

People were asking for that for a long time, until now we received no reply at all whether it's good idea, bad idea, going to be considered, not going to be considered, looking for help, or anything else. I'm fully aware that cg is a single person and he might not have time, knowledge or other resources to make it happen, but the least we can get is a single sentence of response whether he at least considers API to be a good idea. There is really a lot of people here that would gladly help, but how we're expected to help if we didn't even get a reply in 4 years whether this is going to be considered in the first place, let alone details on what needs to be done, improved or fixed.

If the API was available those 3-4 years ago, cg would probably never need to spend time now looking at scripts and other tools generating bandwidth for his servers. This is why I'm saying that if the real motive was to cut on resources spent for scripts and tools, API should be the first thing to create, at the minimum for those SG areas that are heavily used. You can't talk about data optimization if 90% of the data you render and return right now is not asked by any userscript or tool to begin with, this is like trying to optimize highway for car traffic if you can't get 1000 bicycles off the road, and wondering if honking at them will make them drive faster.

And this is not about me or other devs, we all already implemented everything we needed those 4 years ago, this is about how inefficient those implementations are for SG servers. I don't get anything from rewriting my existing, working code into new API, if anything I'm only adding myself extra work for absolutely no self-gains, but huge SG gains in long-run, and I like to be nice to SG if I have a way to do that.

5 years ago*
Permalink

Comment has been collapsed.

Exactly... I hope cg acknowledges this and hopefully will work on this.

5 years ago
Permalink

Comment has been collapsed.

I doubt enforcing gzip will help much because all modern browsers and tools should already prefer to ask for gzipped content by definition

Yep, I just watched the network tab when making a request with ESGST and the response comes in gzip, without me explicitly asking for it.

5 years ago
Permalink

Comment has been collapsed.

Thanks for the info on the updates, and for seeking improvements in performance and usability! Most sysadmins would have just informed of server maintenance, but knowing the SG community indeed has a good component of technically-oriented users, it shows care for all the crowds.

Meanwhile, a GIF to cover all bases ^^

View attached image.
5 years ago
Permalink

Comment has been collapsed.

'll be testing some different servers for our database with AMD processors

EPYC news :)

5 years ago
Permalink

Comment has been collapsed.

wow. didn't know we were on Amazon.

<3

grazie, cg

5 years ago
Permalink

Comment has been collapsed.

Could someday throw some light over how SteamGifts and SteamTrades run? How many servers, balancers, services...some diagrams porn and stuff like that :D

5 years ago
Permalink

Comment has been collapsed.

Happy Holidays!

5 years ago
Permalink

Comment has been collapsed.

If most of traffic comes from addon users, why not release some API to reduce server load?

5 years ago
Permalink

Comment has been collapsed.

Attention to NodeJS devs, just add gzip: true to request options.

5 years ago
Permalink

Comment has been collapsed.

I would also love to see an api.

I'm glad I saw this thread just before my script failed. Otherwise I would have had no idea why this suddenly failed and was returning gibberish. I could see it was a binary blob that that was it.

Note Autoit users.

This is one library of many. I just happened to pick this one as it does not use an external dll.
Written by "Ward".

you will need to include his file.

#include <ZLIB.au3>

and the lines in your code similar to

$web = InetRead($url, 1)
$web = BinaryToString($web)

will become

$web = InetRead($url, 1) 
If StringInStr($url, 'steamgifts') Then $web = _ZLIB_GZUncompress($web)
$web = BinaryToString($web)

adding the one line in between. I'm sure there is a better test of if gzip is used but I'm not seeing it at first glance. I'd rather be more universal but this is the only site I've encountered that uses gzip. Perhaps If I looked at headers? I've never had a need but I know they are returning more data that I'm not currently looking at.

The reason for the if statement is because this is a web page monitor that looks at more then just steamgifts pages. I have several threads I want to know if the original post is modified. They get checked once a day and I get emailed if a change is detected.

5 years ago
Permalink

Comment has been collapsed.

Did not see this post in time, so had to learn it the hard way :(
Anyhow, the fix was indeed super easy - so no harm, no foul.

I also agree with what others wrote - API would make my life easier (in the long run).

5 years ago
Permalink

Comment has been collapsed.

Thank you for the great work
but steamtrades is down ( 504 Gateway Time-out )

5 years ago
Permalink

Comment has been collapsed.

Good work!

5 years ago
Permalink

Comment has been collapsed.

Thanks for the updates, cg.

As a lot of people already mentioned, that high amount of traffic would become very small with a proper API. Endpoints to get information about giveaways and users should already reduce major traffic, at least from ESGST.

One of the most heavy features from ESGST in terms of traffic is the feature that checks if a user has whitelisted / blacklisted you (because people just want to know), so if you provided that information natively, that would already reduce a lot.

5 years ago
Permalink

Comment has been collapsed.

So...a server is some kind of waitress for computers?

5 years ago
Permalink

Comment has been collapsed.

┬──┬◡ノ(° Θ°ノ) Thank You! Maintenance!

5 years ago
Permalink

Comment has been collapsed.

nice

5 years ago
Permalink

Comment has been collapsed.

A quick update on the original post since all of the maintenance has been finished for a couple of days.

  1. The servers all moved to the different availability zone. Moving the databases resulted in some minor downtime of about 30 minutes as the data volumes were snapshotted and recreated.

  2. As expected, most people were moved to the new load balancers almost instantly, and the previous ones received some minor traffic which faded out over 24 hours. They were then shutdown.

  3. The new instance types are working well. There are AMD processors on the SteamGifts database server, and all of the other servers were moved to newer instances and better optimized.

  4. The sites are now only serving gzipped data. This is a screenshot of data transfer from our load balancers before and after the changes, so we're seeing about 50% savings.

Overall, everything went smoothly and the servers are paid for another year. The performance is the same as before, we still have room to grow, and our annual bill will be a couple of thousand less than before.

5 years ago
Permalink

Comment has been collapsed.

juicy good news, cg, thanks a lot for all this.

i'm browsing SG vanilla-way and is truly blazing fast.

edit:

performance is the same as before

does this means it was already blazing fast? :P

5 years ago
Permalink

Comment has been collapsed.

and our annual bill will be a couple of thousand less than before.

I might have spit my tea a little when I read that part. Good to hear :)

5 years ago
Permalink

Comment has been collapsed.

our annual bill will be a couple of thousand less than before.

View attached image.
5 years ago
Permalink

Comment has been collapsed.

if all goes well, you won't notice a thing

has anyone noticed anything?

:D & bump

4 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.