ec2instances.info icon indicating copy to clipboard operation
ec2instances.info copied to clipboard

error in price of cache.r5.4xlarge in Virginia

Open AstroTom opened this issue 2 years ago • 1 comments

Bug: For some reason in Virginia it shows the price for cache.r5.4xlarge as $0.716000 hourly instead of the correct $1.724 It seems to be only in Virginia. In Ohio, for example it looks right. It even correctly shows the reserve price as much higher than on-demand. Sure did throw me for a loop! See https://instances.vantage.sh/cache/?selected=cache.r5.4xlarge

AstroTom avatar Jul 18 '22 10:07 AstroTom

Thanks! Definitely seems wrong, looking into it..

EverettBerry avatar Jul 18 '22 12:07 EverettBerry

Maybe this is the same problem, but I see all kinds of inconsistencies between the on demand price and the Reserved price. i.e if I sort by on demand the reserved price is not in ascending order and visa versa. One of them has to be wrong. I see this now in several regions. I appreciate you guys are busy and can't fix every issue quickly, but if the basic cost data is not correct, then the tool becomes useless.

Thanks :-)

AstroTom avatar Aug 14 '22 19:08 AstroTom

Is this happening only for ElastiCache? EC2 and RDS look correct on a quick glance.

ElastiCache is the newest service and admittedly probably has not been tested as thoroughly. I am seeing this for these instances https://instances.vantage.sh/cache/?selected=cache.r5.large,cache.m5.xlarge,cache.r5.2xlarge,cache.r5.4xlarge,cache.m5.12xlarge,cache.r5.12xlarge

EverettBerry avatar Aug 14 '22 21:08 EverettBerry

I have only noticed the problem with ElastiCache because it was obvious. Simply sorting by cost of either Redis or Memcached and the order of the RI will not match (or visa versa). Thanks for looking into this!

AstroTom avatar Aug 15 '22 18:08 AstroTom

I just noticed this discrepancy when I saw that vantage was listing a cache.m5.xlarge as cheaper than a cache.m5.large:

CleanShot 2022-08-16 at 10 40 15

Here's the us-east-1 pricing page for elasticache:

CleanShot 2022-08-16 at 10 40 45

I wonder if the scraper is picking up the prices from the outposts table:

CleanShot 2022-08-16 at 10 42 01

BRMatt avatar Aug 16 '22 09:08 BRMatt

That could be a nice catch @BRMatt! (I usually use the monthly cost, because it is more human readably)

AstroTom avatar Aug 16 '22 18:08 AstroTom

Nice find @BRMatt this appears to be the problem. I believe all these instances would be affected: image

We are not parsing this page per say, but we do ingest the json file that is loads from, https://github.com/vantage-sh/ec2instances.info/blob/master/cache.py#L67

This file includes a locationType which, for these instances, is "AWS Outposts" which for some reason is popped off the dict before we parse https://github.com/vantage-sh/ec2instances.info/blob/master/cache.py#L117

Then, we only take region and cache_engine into account when getting the Reserved pricing https://github.com/vantage-sh/ec2instances.info/blob/master/cache.py#L190

I've opened a branch, cache-price-error to apply the fix for this.

EverettBerry avatar Aug 16 '22 22:08 EverettBerry

Great! Thanks so much for fixing it. I noticed another small issue. URL parameters like 'selected=' only work on the EC2 page, but not on the RDS or Elasticache page. e.g. the following drops all the params. https://instances.vantage.sh/cache/?selected=cache.r5.large,cache.m5.xlarge,cache.r5.2xlarge,cache.r5.4xlarge,cache.m5.12xlarge,cache.r5.12xlarge

I have tested this in Chrome (incognito) and Edge.

AstroTom avatar Aug 18 '22 06:08 AstroTom

Amazing, thanks for fixing this @EverettBerry!

BRMatt avatar Aug 18 '22 10:08 BRMatt