1

I am running a server which runs main website e.g. http://www.mywebsite.com and another server which holds all APIs lets say. http://api.mywebsite.com. Both of these are built using different technologies.

What I currently do is make a cURL calls to access data from APIs from api.mywebsite.com on www.mywebsite.com but its going very heavy on page response times on www.mywebsite.com.

So I am planning for an alternative a library or something which can help to make similar calls but with lesser resource consumption.

PS: I make GET/POST/PUT/DELETE requests to server so can't use something that only provides GET.

2
  • Have you profiled what exactly is taking the time? Is it the curl library, or simply the network roundtrip? Commented Nov 1, 2012 at 6:24
  • Yes its cURL library which is causing the mayhem earlier I was having direct db connection and every thing was working as expected. Commented Nov 1, 2012 at 11:06

1 Answer 1

2

Why don't you access the data directly off the database?
Have you tried caching with MemCache or Redis?

Sign up to request clarification or add additional context in comments.

3 Comments

I don't want to access data directly from DB. I have API layer which performs several tasks.
If that's the case the best option would be using redis or memcache to store data into RAM for instant access and reduced response time.
Thanks I am going to use Redis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.