cowinapi / developer.cowin

This group is created to facilitate technical and integration discussions related to cowin platform. API related contents can be obtained at API setu portal https://apisetu.gov.in/public/marketplace/api/cowin
115 stars 30 forks source link

API response is very slow with DigitalOcean Virtual Machine #134

Open kartikeyas00 opened 3 years ago

kartikeyas00 commented 3 years ago

I am using DigitalOcean to automate vaccine availability notifications but the Cowin API response seems too slow. I am trying to request this API 'https://www.cowin.gov.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=395&date=11-05-2021' and I have written my code with python.

I have also use the following headers but still very slow. {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}

Is it slow for other people who are using DigitalOcean as well? Do you know what might be the problem? Does it work well with AWS? Also on my personal machine, it works like a charm!

kartikeyas00 commented 3 years ago

Update: I was testing before for district_id=395 which is Mumbai and it was very slow, now I just tested for district_id=392 which is Thane and it works like a charm. Maybe there are some issues with Mumbai but again even Mumbai works great on my personal machine!

rathimittharao commented 3 years ago

@kartikeyas00 what was the authorization you used when accessing this API? I keep hitting a unauthorized access response

monish-1234 commented 3 years ago

Does it work well with AWS?

Yes ! It does. Even Cowin uses AWS for their entire backend. Also make sure you're using an Indian region. The API has been region locked so you might face some issues there also .

kartikeyas00 commented 3 years ago

@kartikeyas00 what was the authorization you used when accessing this API? I keep hitting a unauthorized access response

Nothing it is a public api

kartikeyas00 commented 3 years ago

Does it work well with AWS?

Yes ! It does. Even Cowin uses AWS for their entire backend. Also make sure you're using an Indian region. The API has been region locked so you might face some issues there also .

Gotcha! It's not working well with Digital Ocean though! I am using Bangalore server.

kunalkukrejadotcom commented 3 years ago

I am using DigitalOcean to automate vaccine availability notifications but the Cowin API response seems too slow. I am trying to request this API 'https://www.cowin.gov.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=395&date=11-05-2021' and I have written my code with python.

I have also use the following headers but still very slow. {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}

Is it slow for other people who are using DigitalOcean as well? Do you know what might be the problem? Does it work well with AWS? Also on my personal machine, it works like a charm!

Not sure about DigitalOcean, but doesn't work at all on Heroku. And they only have servers in US and Europe. Seem to me that requests from outside India are blocked. As soon as I go into any VPN, it stops working. Works great on my personal machine as well.

kartikeyas00 commented 3 years ago

It's working great on the digital ocean now. Yes, the access from outside India is blocked!