Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace findthatpostcode with our own self-hosted postcodes.io #1096

Open
mbarton opened this issue Oct 30, 2024 · 4 comments
Open

Replace findthatpostcode with our own self-hosted postcodes.io #1096

mbarton opened this issue Oct 30, 2024 · 4 comments
Assignees
Labels
priority: medium Medium Priority Work - No Max Item Limit

Comments

@mbarton
Copy link
Member

mbarton commented Oct 30, 2024

We have noticed variable performance on findthatpostcode.uk, sometimes up to 10 seconds for a single request. This is fine because we are of course not paying for it! However in practice that's likely to be too slow for our users.

We have discussed creating a self-hosted instance of postcodes.io. We moved away from that provider as it seemed less up to date than findthatpostcode but since then they have made multiple releases and should now be up to date as of August 2024.

It's now up and running at https://api.rcpch.ac.uk/postcodes (API key required).

We will migrate in two steps

  1. Create new settings that when set use our postcodes.io
  2. Remove the old findthatpostcode code path

That way we're rollback safe and won't immediately break everyones local dev environments.

IMPORTANT - we need to discuss how to handle retired postcodes (3 examples in cohort 6).

  • postcodes.io does not return data for them
  • findthatpostcode does
  • Our census platform does not
@mbarton
Copy link
Member Author

mbarton commented Dec 3, 2024

@mbarton
Copy link
Member Author

mbarton commented Jan 16, 2025

I've seen a couple of cases over the past 24 hours where correct postcodes are rejected because findthatpostcode returns a 429 Too Many Requests

@mbarton
Copy link
Member Author

mbarton commented Jan 17, 2025

Bumping the priority of this as I've seen another 429 this morning. It would also "fix" #1173 for future patients by disallowing O as the sector when it should be 0.

Looking at the error message the free allocation is per day, so we might be stuck all day now?

Image

@mbarton mbarton added priority: high High Priority Work - Max 3 Items priority: medium Medium Priority Work - No Max Item Limit and removed priority: high High Priority Work - Max 3 Items labels Jan 17, 2025
@mbarton
Copy link
Member Author

mbarton commented Jan 20, 2025

postcodes.io does have a terminated postcode search that returns geo coordinates so for retired postcodes we could get the IMD that way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium Medium Priority Work - No Max Item Limit
Projects
None yet
Development

No branches or pull requests

1 participant