Coder Social home page Coder Social logo

rws-bugs's People

Contributors

jdorfman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rws-bugs's Issues

Recent Changes To The REST API

I have noticed recent changes to the CDN API, primarily the addition of 'customdomains' and the 'cdn_url' response changing to the 'ssl_url' response value when shared SSL is enabled. I am working to update our API implementation to best support the current changes, and hopefully future intent as I'm not sure what exists in its current state is completed. The 'cdn_url', 'tmp_url', and 'ssl_url' of 'getZone' are no longer listed as documented responses under the API documentation, should these considered to be depreciated and later to be removed ?

While the 'ssl_url' is listed under 'customdomains' as type 'pull-ssl' (at least for pull zones, which is what I use) and custom domains with type 'null' , the temp url is not listed under custom domains at all. Will this always be the case ?

It might be nice to actually label the 'custom domains' as 'pull-custom' and equally include the 'tmp_url' as 'pull-temp', and in the case of a custom ssl 'pull-customssl' or similar, so that all potential URLS are made available.

Additionally, it would be nice if 'customdomains' included as a sub-array of the getZone request to circumvent the need for a secondary request for the initial population of zone data to on page panels.

Furthermore, it would equally be nice if you guys would at the very least inform us somehow, either via blog or e-mail notification, or otherwise that changes have occurred to the API, especially when they can fault an application (as the above / recent change has). Ultimately, a versioning protocol would be ultimately beneficial.

I would very much appreciate an answer to the above questions and concerns.

Occassional SSL/TLS Secure Channel Errors

I'm seeing the following error every couple of days when we make an API call to purge a file from the CDN:

The request was aborted: Could not create SSL/TLS secure channel

Always seems to clear itself up after a few minutes (or less), and we have a recovery process (daemon) in place to retry the purge call, so it hasn't affected us much. Worth noting as a minor issue, though, just in case someone has time to track it down.

REST API Equivalent Of cache.purgeAllCache

Will the REST API have an endpoint for clearing everything in a pull zone? The existing XML-RPC API has a command for purging the entire pull zone -- cache.purgeAllCache -- and I'm not finding an equivalent for the new REST API.

I've been doing some testing on our staging server, and (oddly enough) passing a wildcard for the filename does seem to be working. I think.

https://rws.netdna.com/[company alias]/zones/pull.json/[zone ID]/cache
file=.

If there aren't any plans for supporting the REST equivalent of cache.purgeAllCache and you don't plan to eliminate support for wildcards, then this issue becomes moot.

But if wildcards really aren't working (although testing seems to indicate otherwise) then we'll need an endpoint that does purge the entire pull zone.

HTTPSConnectionPool error when creating pull zones via api

Receiving this error message when trying to create a pull zone with the new api:

HTTPSConnectionPool(host='rws.netdna.com', port=443): Max retries exceeded with url.

I'm calling the API from Google App Engine (python), and I'm wondering if it has to do with this:

Installing NetDNA Python Client
Before you can properly install the NetDNA Python client program, some packages need to be present in your system. Make sure that requests and certifi packages are already installed. Requests is an HTTP library written in Python while he certifi package is an SSL library.

Any clues how to get around this on google app engine? Also, I'm able to use the old API just fine, and I'm also able to purge the cache and get pull zone information without any errors.

Suddenly Getting HTTP 500's

Any idea why code that hasn't been touched since 30MAY13 (when I had to change the API credentials) is suddenly returning this JSON response:

{"code":500,"error":{"message":"Invalid signature","type":"RWS\Exception"}}

Invalid signature? Huh? What? Do I need to rewrite something on my end?

Jerry (Dazed And Confused) H.

Document 'file' parameter for Cache Purge

The example at https://github.com/MaxCDN/php-maxcdn demonstrates purging with a file parameter.

$params = array('file' => '/robots.txt');
echo $api->delete('/zones/pull.json/6055/cache', $params);

The documentation at https://docs.maxcdn.com/#purge-cache lists only a files parameter.

DELETE https://rws.maxcdn.com/{companyalias}/zones/pull.json/{zone_id}/cache

Parameters:

  • files: ...

The PHP example at https://docs.maxcdn.com/#purge-cache demonstrates both a file and a files parameter:

//Purge File
$params = array('file'=>'/index.html');
$api->delete('/zones/pull.json/'.$id.'/cache',$params);
 
//Purge Files
$params = array( 'files' => array(
        '/file1.txt',
        '/file2.txt'
    ) );
$api->delete('/zones/pull.json/'.$id.'/cache',$params);

The Node and Python implementations both exclusively use a files parameter internally at https://github.com/MaxCDN/node-maxcdn/ and https://github.com/MaxCDN/python-maxcdn, but then the example in the README of https://github.com/MaxCDN/python-maxcdn shows a file parameter again:

api.delete("/zones/pull.json/77573/cache", data={'file': '/my-file.png'})

I assume that both work, in which case it would be nice if this were documented so that customers don't waste time debugging whether the problem might be due to file vs files.

It is not clear what "client_id" means at API documentation

Hi,

I am trying to fetch some statistics related to individual files served via osscdn. So far I've tried the following:

  • reports/statsbyfilename.json/monthly
  • clients/reports/statsbyfilename.json/monthly

Both yield

{ code: 200,
  data:
   { page: 1,
     pages: 0,
     page_size: '50',
     current_page_size: 0,
     total: '0',
     statsbyfilename: [],
     summary:
      { '200': null,
        '206': null,
        '404': null,
        hit: null,
        size: null,
        '2xx': null,
        '3xx': null,
        '4xx': null,
        '5xx': null } } }

That isn't very useful. Can you please tell me what that client_id refers to and how to attain it? The examples seem to use blank there.

A couple of other notes:

  • The node examples at your docs should not have a slash prefix. This will fail with the current Node.js bindings.
  • List Stats By File Name and Zone Id appears to be broken/disabled. The example response appears to be Non functional. It took a while for me to notice that. If it doesn't work why to have it in the documentation in the first place?

setting ip address when creating pullzone

Hi

I was refered to this forum from the maxcdn support, as i have issus with creating pullzones and setting custom ip adress using the api.

In the api documentatiopn it says

ip - length: 1-10 chars, only digits accepted Valid IP address of the Origin URL. If omitted, the service will try to lookup the IP automatically. 1.0

The question is, how do i provide an ip adresse only using digits and max 10 characters ? 100.100.100.100 is alone 12 digits and 3 .´s

I have tried the following calls

require_once('NetDNA.php');

$api = new NetDNA("bloggersdelight","secret","secret");
try {

        $params = array('name' => 'tonnytest6',
                        'url' => 'http://erdettirsdag.dk',
                        'ip' => '86.48.100.46',
                        'compress' => '1',
                        'use_stale' => '1',
                        'expires' => '12M');

echo $api->post('/zones/pull.json',$params);
} catch(CurlException $e) {
print_r($e->getMessage());
print_r($e->getHeaders());
}

and also tried sending the ip as decimal

require_once('NetDNA.php');

$api = new NetDNA("bloggersdelight","secret","secret");
try {

        $params = array('name' => 'tonnytest6',
                        'url' => 'http://erdettirsdag.dk',
                        'ip' => ip2long('86.48.100.46'),
                        'compress' => '1',
                        'use_stale' => '1',
                        'expires' => '12M');

echo $api->post('/zones/pull.json',$params);
} catch(CurlException $e) {
print_r($e->getMessage());
print_r($e->getHeaders());
}

both just sets the ip adresse to the resolve ip of the erdettirsdag.dk domain. I need to specifi another ip as we have a dedicated server for providing assets to pull zones.

POST and DELETE actions *SEEM* to be running slow...

Hey,

I've been running some tests in both ruby and node and I'm seeing 20 - 30 seconds on getting a response from POST and DELETE methods. Oddly, when posting a new pull zone, it seems to show up in the web interface almost immediately, but the response doesn't come back quickly.

GET and PUT requests seem to be fine.

Cheers,
Josh

Golang Client

Hi,

Do you have a golang client or this there any reliable one developers can you to access your service ?

Thank you.

Raw Logs API: request_time / origin_time units

Hi,

On the Raw Logs API Documentation it says:

Response Field Description
request_time Time in milliseconds for request to complete
origin_time How long it takes MaxCDN to retrieve the file (if cache status was a MISS)

As I understand it, that means request time is how long it took to serve the content to the browser, and origin time is the time required to load the resource from upstream in case of a cache miss. Please let me know if I've misunderstood here :)

When looking through the values returned from the API, I see the following:

  • Almost all cache HITs have a request_time of zero. I did see a few that had decimal results like 0.044.
  • For cache MISSes, both request_time and origin_time are in the 0.xx range.

For example, using the ruby client:

[29] pry(main)> client.get('v3/reporting/logs.json', limit: 5, status: '200',
                           cache_status: 'MISS')['records'].
                           map  { |r| [r['request_time'], r['origin_time']] }
=> [[0.052, 0.052],
 [0.018, 0.018],
 [0.581, 0.58],
 [0.048, 0.048],
 [0.035, 0.035]]

As a result I have several questions/issues:

  • The docs are incorrect and these units are seconds, right?
  • Why are all the responses for cache HITs zero? Even if these units are seconds I would expect to see response times in the low milliseconds. a recorded response time of zero is not useful for tracking performance.

Req: Push zone is-sync-completed API check? Or ideas how to do without? :)

Hi,
Would it be possible to add an API call that checks whether a particular push zone upload has been synchronised to the edges?

I'd like to build a small web service app to manage installer downloads of some software. I'd like to be able to transfer the newest installer via SFTP to our master fileserver. The app would detect new content and upload it via API calls to a NetDNA/MaxCDN push zone. Then when users request the installer, the app would know somehow whether the content has been pushed out to all edge servers or not. Probably by running a recurring task that checks the NetDNA API from time to time if pending syncs are complete. If the file has been synced to the edges, the small app forwards users that are requesting downloads to the push zone CDN download. If not, the requested downloads are served directly from the master fileserver.

Any ideas on how to best accomplish something like this would also be most appreciated.

(This could be handled in JavaScript client-side I guess by just trying to download the file from the CDN, but I'd actually really like to do this in a minimal server-side app. Feel it would be more robust against silly outdated browsers.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.