green-coding-solutions / eco-ci-energy-estimation

Eco CI Energy estimation for Github Actions Runner VMs
https://metrics.green-coding.io/ci-index.html
MIT License
54 stars 15 forks source link

[Feature request] Using IPinfo.io for IP information (IP Geolocation + ASN) #96

Open abdullahdevrel opened 1 week ago

abdullahdevrel commented 1 week ago

I would like to recommend ipinfo.io for IP data.

Usage example:

curl https://ipinfo.io/8.8.8.8
{
    "ip": "8.8.8.8",
    "hostname": "dns.google",
    "anycast": true,
    "city": "Mountain View",
    "region": "California",
    "country": "US",
    "loc": "37.4056,-122.0775",
    "org": "AS15169 Google LLC",
    "postal": "94043",
    "timezone": "America/Los_Angeles"
}

Documentation: https://ipinfo.io/developers

Free IP databases: https://ipinfo.io/products/free-ip-database


Consider including IPinfo in the project for accurate data and generous free access. Please let me know what you think. Thank you very much.

Relevant linear issue: https://github.com/green-coding-solutions/eco-ci-energy-estimation/pull/77#issuecomment-2149720141

ArneTR commented 3 days ago

Hey @abdullahdevrel

thanks for raising the issue with a feature request!

Generally we are open to integrating another IP service as fallback / mixin.

Can you state what would be the advantages to the one we have already implemented and to the one mentioned in #95

  1. Also just for us internally to know it would be interesting how you got aware of the project?
abdullahdevrel commented 3 days ago

Hi @ArneTR,

Also just for us internally to know it would be interesting how you got aware of the project?

Usually, I explore different projects that use various IP geolocation services and pitch our service as an alternative. I objectively believe we have the best IP data service available, so I engage in active outreach to demonstrate the value of our service. I never try to pitch a paid product.

That is how we partner with open-source projects. The project maintainers are experts in their projects, and once they incorporate our service, they have a line of contact with issues regarding our services. I may not be an expert on your project, but you now know me if you need assistance or advice about IP data. Think of me as an account manager for open-source projects and individual users on the free tier.

Can you state what would be the advantages to the one we have already implemented and to the one mentioned in https://github.com/green-coding-solutions/eco-ci-energy-estimation/issues/95

I am glad that you brought this issue up.

Our take is that we offer fundamentally and objectively the free tier service out there for users and open-source projects.

Compared to the competitor you have mentioned, we have the following to offer:

IPinfo vs IP2Location

Generally we are open to integrating another IP service as fallback / mixin.

I will be honest, I do not prefer a fallback or failover strategy. The reason is KISS. You should use one service for one feature. Adding multiple API services for one feature adds a layer of complexity. Even though you are picking a service when another service fails, at the day, you are functionally incorporating multiple API services for a feature.

I believe that you should pick the one that is objectively better, which is our service. This might sound like I am being persuasive about using a free service, but that is how we partner with Open-Source projects. We make the same commitments to enterprise customers and open-source projects alike. At the end of the day, our users are something we take pride in, and we try our best to support these projects.

Even without a token through unique IP addresses we allow up to 1,000 requests per day. So, the project users should be covered by making one API request every 2 minutes throughout the day.

Let me know what you think. Thanks!