vantage-sh / ec2instances.info

Amazon EC2 instance comparison site
https://ec2instances.info
MIT License
5.21k stars 584 forks source link

RDS pricing key is not unique #522

Closed stkaplan closed 4 years ago

stkaplan commented 4 years ago

There's a lot of issues with RDS pricing, because there's no distinguishing between license model (License included vs BYOL) or database edition (e.g. Oracle Standard vs Enterprise). You also aren't skipping Multi-AZ like you do with reserved instances. These all get mashed together, and whatever is later in the file overwrites the earlier ones.

I can send a PR if you'd be interested in fixing this -- I'm just trying to figure out how to keep the data format mostly unchanged.

powdahound commented 4 years ago

This sounds like a great discovery, thanks! A PR would be wonderful but any additional data you can provide here would also be helpful for others who might have time to investigate this.

Other issues of note: #515, #198

stkaplan commented 4 years ago

It looks like the "engineCode" attribute includes all of the above, except Single-AZ vs. Multi-AZ. So it should be unique for Single-AZ. I can't find this documented anywhere, but it's true in my own testing.

So I'd suggest using engineCode as the key, so it'll look something like:

{
    ...
    "pricing": {
        "us-east-1": {
            "20": {
                "ondemand": 0.6
            },
            "5": {
                "ondemand": 0.272,
            }
        },
        ...
    }
}

then keep a mapping somewhere of what each engine code means. No idea what else that might break (such as the rendering code).

stkaplan commented 4 years ago

Thanks for merging my PR. How often does the live site get updated?

cristim commented 4 years ago

I think it's daily but @powdahound mentioned some build issues with the current version that seem to block it from refreshing at the moment.

powdahound commented 4 years ago

Updated now! @stkaplan how's the new data looking to you?

stkaplan commented 4 years ago

Looks exactly like I expected!

powdahound commented 4 years ago

Awesome! Thanks for your work fixing this!